summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-04-04 18:08:01 +0200
committerLiang Qi <liang.qi@qt.io>2017-04-04 18:09:33 +0200
commit9419dfe8ee45d08f09c09d3cbece511d721546f0 (patch)
tree1c4584099fc1efb8de30cc4526ce7ebafe8a8ce9 /tests/auto/network/ssl
parent8b5aa7b6c40d70a7ec15b3ea485f28a142fb247c (diff)
parent8675e1c5ee7d1209784a2320f1ae3f486b1eaae4 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h src/plugins/platforms/xcb/qxcbwindow.cpp Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
Diffstat (limited to 'tests/auto/network/ssl')
-rw-r--r--tests/auto/network/ssl/qsslsocket/BLACKLIST2
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp18
2 files changed, 18 insertions, 2 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/BLACKLIST b/tests/auto/network/ssl/qsslsocket/BLACKLIST
index 52c023b78f..cfab0b7eb0 100644
--- a/tests/auto/network/ssl/qsslsocket/BLACKLIST
+++ b/tests/auto/network/ssl/qsslsocket/BLACKLIST
@@ -5,3 +5,5 @@ windows
rhel-7.2
[protocolServerSide:tls1.0-any]
rhel-7.2
+[protocolServerSide]
+osx-10.11
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index f44e5261dd..4e2974b4bf 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -29,6 +29,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qthread.h>
+#include <QtCore/qoperatingsystemversion.h>
#include <QtNetwork/qhostaddress.h>
#include <QtNetwork/qhostinfo.h>
#include <QtNetwork/qnetworkproxy.h>
@@ -1170,6 +1171,19 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::addColumn<QSsl::SslProtocol>("clientProtocol");
QTest::addColumn<bool>("works");
+ // On macOS 10.11 with SecureTransport backend some tests are failing for no
+ // obvious reason (so no bug in our code): QTBUG-48860 - an error can be
+ // errSSLInternal or cipher negotiation failure. This problem does not exist
+ // on macOS before 10.11 and after 10.11, so we adjust these tests only for 10.11.
+
+#if defined(QT_SECURETRANSPORT)
+ using OSVersion = QOperatingSystemVersion;
+ const bool testWorks = OSVersion::current() < OSVersion::OSXElCapitan
+ || OSVersion::current() > OSVersion::OSXElCapitan;
+#else
+ const bool testWorks = true;
+#endif
+
#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)
QTest::newRow("ssl2-ssl2") << QSsl::SslV2 << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2
#endif
@@ -1194,14 +1208,14 @@ void tst_QSslSocket::protocolServerSide_data()
#endif
#if !defined(OPENSSL_NO_SSL3)
QTest::newRow("ssl3-tls1.0") << QSsl::SslV3 << QSsl::TlsV1_0 << false;
- QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << true;
+ QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << testWorks;
QTest::newRow("ssl3-secure") << QSsl::SslV3 << QSsl::SecureProtocols << false;
#endif
#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT) && !defined(OPENSSL_NO_SSL3)
QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << false; // we won't set a SNI header here because we connect to a
// numerical IP, so OpenSSL will send a SSL 2 handshake
#elif !defined(OPENSSL_NO_SSL3)
- QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << true;
+ QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << testWorks;
#endif
#if !defined(OPENSSL_NO_SSL2) && !defined(QT_SECURETRANSPORT)