OpenSSL: remove some < 1.0 codepaths
We require OpenSSL >= 1.0 now. Change-Id: I6ffe8b2dd606d600671565ebc8bc8ac2b9e0d6c2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
455951f590
commit
fd83e03e7f
@ -199,12 +199,9 @@ init_context:
|
|||||||
long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
|
long options = QSslSocketBackendPrivate::setupOpenSslOptions(configuration.protocol(), configuration.d->sslOptions);
|
||||||
q_SSL_CTX_set_options(sslContext->ctx, options);
|
q_SSL_CTX_set_options(sslContext->ctx, options);
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
|
|
||||||
// Tell OpenSSL to release memory early
|
// Tell OpenSSL to release memory early
|
||||||
// http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
|
// http://www.openssl.org/docs/ssl/SSL_CTX_set_mode.html
|
||||||
if (q_SSLeay() >= 0x10000000L)
|
q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
|
||||||
q_SSL_CTX_set_mode(sslContext->ctx, SSL_MODE_RELEASE_BUFFERS);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Initialize ciphers
|
// Initialize ciphers
|
||||||
QByteArray cipherString;
|
QByteArray cipherString;
|
||||||
|
@ -472,7 +472,7 @@ bool QSslSocketBackendPrivate::initSslContext()
|
|||||||
if (configuration.protocol != QSsl::SslV2 &&
|
if (configuration.protocol != QSsl::SslV2 &&
|
||||||
configuration.protocol != QSsl::SslV3 &&
|
configuration.protocol != QSsl::SslV3 &&
|
||||||
configuration.protocol != QSsl::UnknownProtocol &&
|
configuration.protocol != QSsl::UnknownProtocol &&
|
||||||
mode == QSslSocket::SslClientMode && QSslSocket::sslLibraryVersionNumber() >= 0x00090806fL) {
|
mode == QSslSocket::SslClientMode) {
|
||||||
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
|
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
|
||||||
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;
|
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;
|
||||||
if (tlsHostName.isEmpty())
|
if (tlsHostName.isEmpty())
|
||||||
|
Loading…
Reference in New Issue
Block a user