summaryrefslogtreecommitdiffstats
path: root/tests/auto/qsslsocket
diff options
context:
space:
mode:
authorJanne Anttila <janne.anttila@digia.com>2009-04-29 13:45:44 +0300
committerJanne Anttila <janne.anttila@digia.com>2009-04-29 13:45:44 +0300
commit7e4e7f66ab5f799c4a4ac71141b322841d05153a (patch)
tree8b9dfb4c44c79d5d4da8ae8f7dbaad8aa5edb6b1 /tests/auto/qsslsocket
parentee45a77ce45011b09a2984df007941460245a534 (diff)
Fixed tst_QSslSocket::sslErrors test for Symbian HW.
Diffstat (limited to 'tests/auto/qsslsocket')
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index b62d62977d..8dfbedd771 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -509,22 +509,28 @@ void tst_QSslSocket::sslErrors_data()
QTest::addColumn<SslErrorList>("errors");
#if defined(Q_OS_SYMBIAN)
- QTest::newRow("aspiriniks.troll.no") << QtNetworkSettings::serverName() << 443
+
+ QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port443") << QtNetworkSettings::serverName() << 443
<< (SslErrorList()
<< QSslError::SelfSignedCertificate
-#if !defined(Q_CC_NOKIAX86)
- << QSslError::CertificateNotYetValid
-#endif //!defined(Q_CC_NOKIAX86)
);
- QTest::newRow("aspiriniks.troll.no") << QtNetworkSettings::serverName() << 993
+ QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port993") << QtNetworkSettings::serverName() << 993
<< (SslErrorList()
<< QSslError::HostNameMismatch
- << QSslError::SelfSignedCertificate
-
-#if !defined(Q_CC_NOKIAX86)
- << QSslError::CertificateNotYetValid
-#endif //!defined(Q_CC_NOKIAX86)
- );
+ << QSslError::SelfSignedCertificate
+ );
+ // TODO: Should we have QtNetworkSettings::serverName alias
+ // in order that we could test with different host name
+
+#else
+ QTest::newRow("imap.troll.no") << "imap.troll.no" << 993
+ << (SslErrorList()
+ << QSslError::HostNameMismatch
+ << QSslError::SelfSignedCertificateInChain);
+ QTest::newRow("imap.trolltech.com") << "imap.trolltech.com" << 993
+ << (SslErrorList()
+ << QSslError::SelfSignedCertificateInChain);
+
#endif //Q_OS_SYMBIAN
}
@@ -1039,7 +1045,7 @@ void tst_QSslSocket::wildcard()
// returns the CNAME fluke.troll.no for this domain. The web server
// responds with the wildcard, and QSslSocket should accept that as a
// valid connection. This was broken in 4.3.0.
- QSslSocketPtr socket = newSocket();;
+ QSslSocketPtr socket = newSocket();
socket->addCaCertificates(QLatin1String("certs/aspiriniks.ca.crt"));
this->socket = socket;
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND