diff options
Diffstat (limited to 'tests/auto/qsslsocket/tst_qsslsocket.cpp')
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 6147551..9f7b537 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -505,21 +505,18 @@ void tst_QSslSocket::sslErrors_data() { QTest::addColumn<QString>("host"); QTest::addColumn<int>("port"); - QTest::addColumn<SslErrorList>("errors"); - - QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port443") << QtNetworkSettings::serverName() << 443 - << (SslErrorList() - << QSslError::UnableToGetLocalIssuerCertificate - << QSslError::CertificateUntrusted - << QSslError::UnableToVerifyFirstCertificate - ); - QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port993") << QtNetworkSettings::serverName() << 993 - << (SslErrorList() - << QSslError::HostNameMismatch - << QSslError::SelfSignedCertificate - ); - // TODO: Should we have QtNetworkSettings::serverName alias - // in order that we could test with different host name + QTest::addColumn<SslErrorList>("expected"); + + QTest::newRow(qPrintable(QtNetworkSettings::serverLocalName())) + << QtNetworkSettings::serverLocalName() + << 993 + << (SslErrorList() << QSslError::HostNameMismatch + << QSslError::SelfSignedCertificate); + + QTest::newRow("imap.trolltech.com") + << "imap.trolltech.com" + << 993 + << (SslErrorList() << QSslError::SelfSignedCertificateInChain); } void tst_QSslSocket::sslErrors() |