summaryrefslogtreecommitdiff
path: root/kdecore/network/ktcpsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdecore/network/ktcpsocket.cpp')
-rw-r--r--kdecore/network/ktcpsocket.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/kdecore/network/ktcpsocket.cpp b/kdecore/network/ktcpsocket.cpp
index 3a739f2..cdffccf 100644
--- a/kdecore/network/ktcpsocket.cpp
+++ b/kdecore/network/ktcpsocket.cpp
@@ -63,7 +63,12 @@ static QSsl::SslProtocol qSslProtocolFromK(KTcpSocket::SslVersion sslVersion)
return QSsl::AnyProtocol;
}
//does it contain any valid protocol?
- if (!(sslVersion & (KTcpSocket::SslV2 | KTcpSocket::SslV3 | KTcpSocket::TlsV1))) {
+ KTcpSocket::SslVersions validVersions (KTcpSocket::SslV2 | KTcpSocket::SslV3 | KTcpSocket::TlsV1);
+#if QT_VERSION >= 0x040800
+ validVersions |= KTcpSocket::TlsV1SslV3;
+ validVersions |= KTcpSocket::SecureProtocols;
+#endif
+ if (!(sslVersion & validVersions)) {
return QSsl::UnknownProtocol;
}