summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Hartmann <peter.hartmann@nokia.com>2011-11-14 12:33:55 +0100
committerQt by Nokia <qt-info@nokia.com>2011-11-16 10:32:10 +0100
commit4dc390e66fefc850cf84292549285a359e2ad8e6 (patch)
treedfc39a2b1e83826ad959a48ec9d7345db1ab3383 /tests
parente2628ef943f5787da92e737ce259db0750154ef7 (diff)
SSL namespace: rename TlsV1 to TlsV1_0
This is a source-incompatible change. TlsV1 is ambiguous; what is actually meant is TLS version 1.0. There are also TLS versions 1.1 and 1.2; we might want to add options for these once OpenSSL supports them (apparently they will be with OpenSSL version 1.0.1). Change-Id: I940d020b181b5fa528788ef0c3c47e8ef873796a Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp34
-rw-r--r--tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp6
2 files changed, 20 insertions, 20 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 9300579bad..d9ea400d0a 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -823,18 +823,18 @@ void tst_QSslSocket::protocol()
}
{
// Fluke allows TLSV1.
- socket->setProtocol(QSsl::TlsV1);
- QCOMPARE(socket->protocol(), QSsl::TlsV1);
+ socket->setProtocol(QSsl::TlsV1_0);
+ QCOMPARE(socket->protocol(), QSsl::TlsV1_0);
socket->connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QVERIFY2(socket->waitForEncrypted(), qPrintable(socket->errorString()));
- QCOMPARE(socket->protocol(), QSsl::TlsV1);
+ QCOMPARE(socket->protocol(), QSsl::TlsV1_0);
socket->abort();
- QCOMPARE(socket->protocol(), QSsl::TlsV1);
+ QCOMPARE(socket->protocol(), QSsl::TlsV1_0);
socket->connectToHost(QtNetworkSettings::serverName(), 443);
QVERIFY2(socket->waitForConnected(), qPrintable(socket->errorString()));
socket->startClientEncryption();
QVERIFY2(socket->waitForEncrypted(), qPrintable(socket->errorString()));
- QCOMPARE(socket->protocol(), QSsl::TlsV1);
+ QCOMPARE(socket->protocol(), QSsl::TlsV1_0);
socket->abort();
}
{
@@ -892,7 +892,7 @@ class SslServer : public QTcpServer
public:
SslServer(const QString &keyFile = SRCDIR "certs/fluke.key", const QString &certFile = SRCDIR "certs/fluke.cert")
: socket(0),
- protocol(QSsl::TlsV1),
+ protocol(QSsl::TlsV1_0),
m_keyFile(keyFile),
m_certFile(certFile) { }
QSslSocket *socket;
@@ -943,46 +943,46 @@ void tst_QSslSocket::protocolServerSide_data()
QTest::newRow("ssl2-ssl2") << QSsl::SslV2 << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2
QTest::newRow("ssl3-ssl3") << QSsl::SslV3 << QSsl::SslV3 << true;
- QTest::newRow("tls1-tls1") << QSsl::TlsV1 << QSsl::TlsV1 << true;
+ QTest::newRow("tls1.0-tls1.0") << QSsl::TlsV1_0 << QSsl::TlsV1_0 << true;
QTest::newRow("tls1ssl3-tls1ssl3") << QSsl::TlsV1SslV3 << QSsl::TlsV1SslV3 << true;
QTest::newRow("any-any") << QSsl::AnyProtocol << QSsl::AnyProtocol << true;
QTest::newRow("secure-secure") << QSsl::SecureProtocols << QSsl::SecureProtocols << true;
QTest::newRow("ssl2-ssl3") << QSsl::SslV2 << QSsl::SslV3 << false;
- QTest::newRow("ssl2-tls1") << QSsl::SslV2 << QSsl::TlsV1 << false;
+ QTest::newRow("ssl2-tls1.0") << QSsl::SslV2 << QSsl::TlsV1_0 << false;
QTest::newRow("ssl2-tls1ssl3") << QSsl::SslV2 << QSsl::TlsV1SslV3 << false;
QTest::newRow("ssl2-secure") << QSsl::SslV2 << QSsl::SecureProtocols << false;
QTest::newRow("ssl2-any") << QSsl::SslV2 << QSsl::AnyProtocol << false; // no idea why it does not work, but we don't care about SSL 2
QTest::newRow("ssl3-ssl2") << QSsl::SslV3 << QSsl::SslV2 << false;
- QTest::newRow("ssl3-tls1") << QSsl::SslV3 << QSsl::TlsV1 << false;
+ 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;
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
- QTest::newRow("tls1-ssl2") << QSsl::TlsV1 << QSsl::SslV2 << false;
- QTest::newRow("tls1-ssl3") << QSsl::TlsV1 << QSsl::SslV3 << false;
- QTest::newRow("tls1-tls1ssl3") << QSsl::TlsV1 << QSsl::TlsV1SslV3 << true;
- QTest::newRow("tls1-secure") << QSsl::TlsV1 << QSsl::SecureProtocols << true;
- QTest::newRow("tls1-any") << QSsl::TlsV1 << QSsl::AnyProtocol << false; // we wont set a SNI header here because we connect to a
+ QTest::newRow("tls1.0-ssl2") << QSsl::TlsV1_0 << QSsl::SslV2 << false;
+ 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;
+ 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
QTest::newRow("tls1ssl3-ssl2") << QSsl::TlsV1SslV3 << QSsl::SslV2 << false;
QTest::newRow("tls1ssl3-ssl3") << QSsl::TlsV1SslV3 << QSsl::SslV3 << true;
- QTest::newRow("tls1ssl3-tls1") << QSsl::TlsV1SslV3 << QSsl::TlsV1 << true;
+ QTest::newRow("tls1ssl3-tls1.0") << QSsl::TlsV1SslV3 << QSsl::TlsV1_0 << true;
QTest::newRow("tls1ssl3-secure") << QSsl::TlsV1SslV3 << QSsl::SecureProtocols << true;
QTest::newRow("tls1ssl3-any") << QSsl::TlsV1SslV3 << QSsl::AnyProtocol << true;
QTest::newRow("secure-ssl2") << QSsl::SecureProtocols << QSsl::SslV2 << false;
QTest::newRow("secure-ssl3") << QSsl::SecureProtocols << QSsl::SslV3 << true;
- QTest::newRow("secure-tls1") << QSsl::SecureProtocols << QSsl::TlsV1 << true;
+ QTest::newRow("secure-tls1.0") << QSsl::SecureProtocols << QSsl::TlsV1_0 << true;
QTest::newRow("secure-tls1ssl3") << QSsl::SecureProtocols << QSsl::TlsV1SslV3 << true;
QTest::newRow("secure-any") << QSsl::SecureProtocols << QSsl::AnyProtocol << true;
QTest::newRow("any-ssl2") << QSsl::AnyProtocol << QSsl::SslV2 << false; // no idea why it does not work, but we don't care about SSL 2
QTest::newRow("any-ssl3") << QSsl::AnyProtocol << QSsl::SslV3 << true;
- QTest::newRow("any-tls1") << QSsl::AnyProtocol << QSsl::TlsV1 << true;
+ QTest::newRow("any-tls1.0") << QSsl::AnyProtocol << QSsl::TlsV1_0 << true;
QTest::newRow("any-tls1ssl3") << QSsl::AnyProtocol << QSsl::TlsV1SslV3 << true;
QTest::newRow("any-secure") << QSsl::AnyProtocol << QSsl::SecureProtocols << true;
}
diff --git a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
index 59a8e9ea90..77589d350e 100644
--- a/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
+++ b/tests/manual/network_remote_stresstest/tst_network_remote_stresstest.cpp
@@ -253,7 +253,7 @@ void tst_NetworkRemoteStressTest::blockingSequentialRemoteHosts()
QVERIFY2(socket->waitForConnected(10000), "Timeout connecting to " + url.encodedHost());
if (isHttps) {
- static_cast<QSslSocket *>(socket.data())->setProtocol(QSsl::TlsV1);
+ static_cast<QSslSocket *>(socket.data())->setProtocol(QSsl::TlsV1_0);
static_cast<QSslSocket *>(socket.data())->startClientEncryption();
static_cast<QSslSocket *>(socket.data())->ignoreSslErrors();
QVERIFY2(static_cast<QSslSocket *>(socket.data())->waitForEncrypted(10000), "Timeout starting TLS with " + url.encodedHost());
@@ -306,7 +306,7 @@ void tst_NetworkRemoteStressTest::sequentialRemoteHosts()
socket = QSharedPointer<QTcpSocket>(new QTcpSocket);
}
if (isHttps) {
- static_cast<QSslSocket *>(socket.data())->setProtocol(QSsl::TlsV1);
+ static_cast<QSslSocket *>(socket.data())->setProtocol(QSsl::TlsV1_0);
static_cast<QSslSocket *>(socket.data())->connectToHostEncrypted(url.host(), url.port(443));
static_cast<QSslSocket *>(socket.data())->ignoreSslErrors();
} else {
@@ -377,7 +377,7 @@ void tst_NetworkRemoteStressTest::parallelRemoteHosts()
else
socket = new QTcpSocket;
if (isHttps) {
- static_cast<QSslSocket *>(socket)->setProtocol(QSsl::TlsV1);
+ static_cast<QSslSocket *>(socket)->setProtocol(QSsl::TlsV1_0);
static_cast<QSslSocket *>(socket)->connectToHostEncrypted(url.host(), url.port(443));
static_cast<QSslSocket *>(socket)->ignoreSslErrors();
} else {