From 7e4e7f66ab5f799c4a4ac71141b322841d05153a Mon Sep 17 00:00:00 2001 From: Janne Anttila Date: Wed, 29 Apr 2009 13:45:44 +0300 Subject: Fixed tst_QSslSocket::sslErrors test for Symbian HW. --- tests/auto/qsslsocket/tst_qsslsocket.cpp | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index b62d629..8dfbedd 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("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 -- cgit v0.12