cURL / Mailing Lists / curl-library / Single Mail

curl-library

SSL_CTX_callback_ctrl callback changed

From: Yang Tse <yangsita_at_gmail.com>
Date: Sun, 13 Nov 2005 05:26:47 +0100

When trying to build curl-7.15.0 with openssl-0.9.8 using msvc60 and
msvc71 I get the following warning:

ssluse.c(1165) : warning C4113: 'void (__cdecl *)(int,int,int,const
void *,size_t,const SSL *,connectdata *)' differs in parameter lists
from 'void (__cdecl *)(void)'

This warning results when setting the ssl_tls_trace callback at...

        if (!SSL_CTX_callback_ctrl(connssl->ctx, SSL_CTRL_SET_MSG_CALLBACK,
                        ssl_tls_trace)) {
                failf(data, "SSL: couldn't set callback!");
                return CURLE_SSL_CONNECT_ERROR;
        }

I've been able to track the matter down to the fact that the openssl
interface for SSL_CTX_callback_ctrl has been changed between
openssl-0.9.7* and openssl-0.9.8*.

The related changes in openssl are in files ssl_lib.c and ssl.h

openssl-0.9.7* [ssl.h] long SSL_CTX_callback_ctrl(SSL_CTX *, int,
void (*)());
openssl-0.9.7* [ssl_lib.c] long SSL_CTX_callback_ctrl(SSL_CTX *ctx,
int cmd, void (*fp)())

openssl-0.9.7* [ssl.h] long SSL_CTX_callback_ctrl(SSL_CTX *, int,
void (*)(void));
openssl-0.9.8* [ssl_lib.c] long SSL_CTX_callback_ctrl(SSL_CTX *ctx,
int cmd, void (*fp)(void))

I'm not sure how this change should be addressed by curl, since there
might also be other implications, I'm not able to see.

Anyway, if someone with good knowledge of curl is able to provide a
patch for this I would gladly test it.

żAny comments?

Best regards
Received on 2005-11-13