Despite the man page not changing, the d2i_SSL_SESSION() prototype changed
between OpenSSL 0.9.7e and 0.9.7g:

    0.9.7e:

        SSL_SESSION *d2i_SSL_SESSION(
            SSL_SESSION **a,
            unsigned char **pp,
            long length);

    0.9.7g:

        SSL_SESSION *d2i_SSL_SESSION(
            SSL_SESSION **a,
            const unsigned char * const *pp,
            long length);

This causes gcc 2.96 to generate a spurious warning for the following
code (Postfix 2.2.x tls/tls_session.c line 171):

    tls_session.c: In function `tls_session_activate':
    tls_session.c:171: warning: passing arg 2 of `d2i_SSL_SESSION' from 
incompatible pointer type

    SSL_SESSION *tls_session_activate(char *session_data, int session_data_len)
    {
        SSL_SESSION *session;
        unsigned char *ptr;

        /*
         * Activate the SSL_SESSION object.
         */
        ptr = (unsigned char *) session_data;
        session = d2i_SSL_SESSION((SSL_SESSION **) 0, &ptr, session_data_len);
        if (!session)
            tls_print_errors();

        return (session);
    }

I don't see why the compiler objects to passing a pointer to a pointer
to a constant character, to a function that expects a pointer to a constant
pointer to a constant character, anyway just in case anyone asks, this is
not a real problem.

Still, if the interface changes, the documentation should probably
change also.

-- 
        Viktor.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to