diff options
author | Peter Hartmann <peter.hartmann@nokia.com> | 2011-11-24 13:15:18 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-25 14:37:02 +0100 |
commit | 09404c072fec2e195d8114dc4d95ce3683c341cf (patch) | |
tree | 08046cb04b61479481dbcc09fbc842a4ba836814 /src/network/ssl/qsslsocket_openssl.cpp | |
parent | f4b6628083bf98ffa9169d8a8b890d84b6046867 (diff) |
SSL: fix build when compiled with -openssl-linked
... and only resolve the functions when the methods are available.
SSL 2 functionality is not always available in OpenSSL anymore.
Change-Id: Ia3178685b26c67ac55447476789e06710b596181
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Diffstat (limited to 'src/network/ssl/qsslsocket_openssl.cpp')
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index d8f291b9c7..f70b4217bd 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -277,7 +277,11 @@ bool QSslSocketBackendPrivate::initSslContext() init_context: switch (configuration.protocol) { case QSsl::SslV2: +#ifndef OPENSSL_NO_SSL2 ctx = q_SSL_CTX_new(client ? q_SSLv2_client_method() : q_SSLv2_server_method()); +#else + ctx = 0; // SSL 2 not supported by the system, but chosen deliberately -> error +#endif break; case QSsl::SslV3: ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method()); |