SSL: fix build with -openssl-linked for OpenSSL 0.9.8*
OpenSSL's SSL_ctrl() always took a "void *" argument as 4th parameter, since at least version 0.9.7. I have no idea why we had "const void *" in there. Reviewed-by: Richard J. Moore <rich@kde.org> Task-number: QTBUG-23132 (cherry picked from commit 4db91cbd6147e40f543342f22c05b7baddc52e5a) Change-Id: Ie570e1cc59b72f13d3e6f3ed6fc1892444a63743 Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>bb10
parent
e6ee1848a3
commit
86f5b78394
|
|
@ -453,11 +453,7 @@ init_context:
|
|||
if (!ace.isEmpty()
|
||||
&& !QHostAddress().setAddress(tlsHostName)
|
||||
&& !(configuration.sslOptions & QSsl::SslOptionDisableServerNameIndication)) {
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.data()))
|
||||
#else
|
||||
if (!q_SSL_ctrl(ssl, SSL_CTRL_SET_TLSEXT_HOSTNAME, TLSEXT_NAMETYPE_host_name, ace.constData()))
|
||||
#endif
|
||||
qWarning("could not set SSL_CTRL_SET_TLSEXT_HOSTNAME, Server Name Indication disabled");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,11 +218,7 @@ DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
|
|||
DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
|
||||
DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return)
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, void *parg, parg, return -1, return)
|
||||
#else
|
||||
DEFINEFUNC4(long, SSL_ctrl, SSL *a, a, int cmd, cmd, long larg, larg, const void *parg, parg, return -1, return)
|
||||
#endif
|
||||
#endif
|
||||
DEFINEFUNC3(int, SSL_read, SSL *a, a, void *b, b, int c, c, return -1, return)
|
||||
DEFINEFUNC3(void, SSL_set_bio, SSL *a, a, BIO *b, b, BIO *c, c, return, DUMMYARG)
|
||||
|
|
|
|||
|
|
@ -325,11 +325,7 @@ int q_SSL_library_init();
|
|||
void q_SSL_load_error_strings();
|
||||
SSL *q_SSL_new(SSL_CTX *a);
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
||||
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
|
||||
#else
|
||||
long q_SSL_ctrl(SSL *ssl,int cmd, long larg, const void *parg);
|
||||
#endif
|
||||
#endif
|
||||
int q_SSL_read(SSL *a, void *b, int c);
|
||||
void q_SSL_set_bio(SSL *a, BIO *b, BIO *c);
|
||||
|
|
|
|||
Loading…
Reference in New Issue