summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorShane Kearns <ext-shane.2.kearns@nokia.com>2012-05-08 18:11:18 +0100
committerQt by Nokia <qt-info@nokia.com>2012-05-10 02:39:30 +0200
commit7578a9f69df1febf1ce26a3a66e3ada40a1205ff (patch)
tree2aa28ff4e89ee654e32bc8a1448d60dc53db2102 /tests/auto
parentc47c8ba59e87facaaad53e69f7830719217110aa (diff)
Fix a QSslSocket test expectation on ubuntu 11.10
Because SSL2 is disabled in ubuntu's openssl binaries, the SSL connection is expected to succeed rather than fail when the server side is using SSL3/TLS1.0. Used the OPENSSL_NO_SSL2 macro to decide this. Change-Id: I2c35aa5aa0c9432ae78000c81f70086bdc31843d Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index e134f346e2..444762e680 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -970,8 +970,12 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::newRow("ssl3-tls1.0") << QSsl::SslV3 << QSsl::TlsV1_0 << false;
QTest::newRow("ssl3-tls1ssl3") << QSsl::SslV3 << QSsl::TlsV1SslV3 << true;
QTest::newRow("ssl3-secure") << QSsl::SslV3 << QSsl::SecureProtocols << true;
+#ifndef OPENSSL_NO_SSL2
QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << false; // we wont set a SNI header here because we connect to a
// numerical IP, so OpenSSL will send a SSL 2 handshake
+#else
+ QTest::newRow("ssl3-any") << QSsl::SslV3 << QSsl::AnyProtocol << true;
+#endif
#ifndef OPENSSL_NO_SSL2
QTest::newRow("tls1.0-ssl2") << QSsl::TlsV1_0 << QSsl::SslV2 << false;
@@ -979,8 +983,12 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::newRow("tls1.0-ssl3") << QSsl::TlsV1_0 << QSsl::SslV3 << false;
QTest::newRow("tls1-tls1ssl3") << QSsl::TlsV1_0 << QSsl::TlsV1SslV3 << true;
QTest::newRow("tls1.0-secure") << QSsl::TlsV1_0 << QSsl::SecureProtocols << true;
+#ifndef OPENSSL_NO_SSL2
QTest::newRow("tls1.0-any") << QSsl::TlsV1_0 << QSsl::AnyProtocol << false; // we wont set a SNI header here because we connect to a
// numerical IP, so OpenSSL will send a SSL 2 handshake
+#else
+ QTest::newRow("tls1.0-any") << QSsl::TlsV1_0 << QSsl::AnyProtocol << true;
+#endif
#ifndef OPENSSL_NO_SSL2
QTest::newRow("tls1ssl3-ssl2") << QSsl::TlsV1SslV3 << QSsl::SslV2 << false;
@@ -1041,10 +1049,6 @@ void tst_QSslSocket::protocolServerSide()
QFETCH(bool, works);
QAbstractSocket::SocketState expectedState = (works) ? QAbstractSocket::ConnectedState : QAbstractSocket::UnconnectedState;
-#if defined(UBUNTU_ONEIRIC) && defined(__x86_64__)
- QEXPECT_FAIL("ssl3-any", "QTBUG-23575 - Fails on this platform", Abort);
- QEXPECT_FAIL("tls1.0-any", "QTBUG-23575 - Fails on this platform", Abort);
-#endif
QCOMPARE(int(client->state()), int(expectedState));
QCOMPARE(client->isEncrypted(), works);
}