From e5408b62bdcee1abbc595eb581abcb540396ca4c Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Wed, 5 Feb 2020 08:35:21 +0100 Subject: Fix symbol resolving for OPENSSL_NO_NEXPROTONEG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Our ALPN-related definitions were conditioned both on OPENSSL_NO_NEXTPROTONEG and OpenSSL version (since ALPN first was introduced in 1.0.2), but resolving was only under version check, not OPENSSL_NO_NEXTPROTONEG. This went unnoticed for many years, and was found only recently with OpenSSL built with no-nexprotoneg. Fixes: QTBUG-81762 Change-Id: I7afca0b2034a234a19b5bcdefd3ce26f4202cddb Reviewed-by: MÃ¥rten Nordheim --- src/network/ssl/qsslsocket_openssl_symbols.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp index 1fcfdf9f16..26336edd3d 100644 --- a/src/network/ssl/qsslsocket_openssl_symbols.cpp +++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp @@ -1375,12 +1375,12 @@ bool q_resolveOpenSslSymbols() RESOLVEFUNC(SSL_select_next_proto) RESOLVEFUNC(SSL_CTX_set_next_proto_select_cb) RESOLVEFUNC(SSL_get0_next_proto_negotiated) -#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ... #if OPENSSL_VERSION_NUMBER >= 0x10002000L - RESOLVEFUNC(SSL_set_alpn_protos) - RESOLVEFUNC(SSL_CTX_set_alpn_select_cb) - RESOLVEFUNC(SSL_get0_alpn_selected) + RESOLVEFUNC(SSL_set_alpn_protos) + RESOLVEFUNC(SSL_CTX_set_alpn_select_cb) + RESOLVEFUNC(SSL_get0_alpn_selected) #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L ... +#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ... #if QT_CONFIG(dtls) RESOLVEFUNC(SSL_CTX_set_cookie_generate_cb) RESOLVEFUNC(SSL_CTX_set_cookie_verify_cb) -- cgit v1.2.3