QSsl: teach the SecureTransport backend about TlsV1_0OrLater, TlsV1_1OrLater and TlsV1_2OrLater
Change-Id: I001ffebef30b47b63cae6ea9487d9e96ca85ff92 Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
parent
839f38bcfa
commit
b6b5ba0e23
@ -913,6 +913,27 @@ bool QSslSocketBackendPrivate::setSessionProtocol()
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_0OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qDebug() << Q_FUNC_INFO << plainSocket << "requesting : TLSv1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol1);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_1OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qDebug() << Q_FUNC_INFO << plainSocket << "requesting : TLSv1.1 - TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol11);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else if (configuration.protocol == QSsl::TlsV1_2OrLater) {
|
||||
#ifdef QSSLSOCKET_DEBUG
|
||||
qDebug() << Q_FUNC_INFO << plainSocket << "requesting : TLSv1.2";
|
||||
#endif
|
||||
err = SSLSetProtocolVersionMin(context, kTLSProtocol12);
|
||||
if (err == noErr)
|
||||
err = SSLSetProtocolVersionMax(context, kTLSProtocol12);
|
||||
} else {
|
||||
qDebug() << Q_FUNC_INFO << "no protocol version found in the configuration";
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user