Fix SNI for TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater

Since SslV3, SslV2 and UnknownProtocol do not support it we can
invert the IF clause here.

Change-Id: I42e942337d01f3a8c97885b268bffa568e40d335
Task-number: QTBUG-47528
Reviewed-by: Mikkel Krautz <mikkel@krautz.dk>
Reviewed-by: Richard J. Moore <rich@kde.org>
bb10
André Klitzing 2015-07-30 10:08:36 +02:00
parent d113073203
commit 0d3c8feeeb
1 changed files with 3 additions and 6 deletions

View File

@ -377,12 +377,9 @@ bool QSslSocketBackendPrivate::initSslContext()
return false;
}
if ((configuration.protocol == QSsl::TlsV1SslV3 ||
configuration.protocol == QSsl::TlsV1_0 ||
configuration.protocol == QSsl::TlsV1_1 ||
configuration.protocol == QSsl::TlsV1_2 ||
configuration.protocol == QSsl::SecureProtocols ||
configuration.protocol == QSsl::AnyProtocol) &&
if (configuration.protocol != QSsl::SslV2 &&
configuration.protocol != QSsl::SslV3 &&
configuration.protocol != QSsl::UnknownProtocol &&
mode == QSslSocket::SslClientMode && q_SSLeay() >= 0x00090806fL) {
// Set server hostname on TLS extension. RFC4366 section 3.1 requires it in ACE format.
QString tlsHostName = verificationPeerName.isEmpty() ? q->peerName() : verificationPeerName;