summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-04 20:11:55 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-04 20:11:55 (GMT)
commitf558b7237004089e74bf907353e236dfc7968a6b (patch)
treef9bc8227872252b4c31b534f68318498b352ba74
parent16f053f5c40ea4579807199a1ee7d5ea78b839b8 (diff)
downloadlibcalendaring-f558b7237004089e74bf907353e236dfc7968a6b.tar.gz
Fixed SNI support caused by missing KTcpSocket::SslVersion to QSsl::SslProtocol
conversions. df1f193ba792b3bd258254ab3f75d4e76b0d0524 (kdelibs)
-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;
}