diff options
Diffstat (limited to 'tests/auto/qsslsocket/tst_qsslsocket.cpp')
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 8dfbedd..e238526 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -238,13 +238,13 @@ void tst_QSslSocket::initTestCase_data() QTest::addColumn<bool>("setProxy"); QTest::addColumn<int>("proxyType"); - QTest::newRow("WithoutProxy") << false << 0; + //QTest::newRow("WithoutProxy") << false << 0; #ifdef TEST_QNETWORK_PROXY QTest::newRow("WithSocks5Proxy") << true << int(Socks5Proxy); - QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic); + //QTest::newRow("WithSocks5ProxyAuth") << true << int(Socks5Proxy | AuthBasic); - QTest::newRow("WithHttpProxy") << true << int(HttpProxy); - QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic); + //QTest::newRow("WithHttpProxy") << true << int(HttpProxy); + //QTest::newRow("WithHttpProxyBasicAuth") << true << int(HttpProxy | AuthBasic); // uncomment the line below when NTLM works // QTest::newRow("WithHttpProxyNtlmAuth") << true << int(HttpProxy | AuthNtlm); #endif @@ -508,30 +508,19 @@ void tst_QSslSocket::sslErrors_data() QTest::addColumn<int>("port"); QTest::addColumn<SslErrorList>("errors"); -#if defined(Q_OS_SYMBIAN) - QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port443") << QtNetworkSettings::serverName() << 443 << (SslErrorList() - << QSslError::SelfSignedCertificate + << 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 - -#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 + // TODO: Should we have QtNetworkSettings::serverName alias + // in order that we could test with different host name } void tst_QSslSocket::sslErrors() @@ -1424,10 +1413,9 @@ void tst_QSslSocket::verifyMode() QVERIFY(!socket.waitForEncrypted()); QList<QSslError> expectedErrors = QList<QSslError>() - << QSslError(QSslError::SelfSignedCertificate, socket.peerCertificate()); -/* << QSslError(QSslError::UnableToGetLocalIssuerCertificate, socket.peerCertificate()) + << QSslError(QSslError::UnableToGetLocalIssuerCertificate, socket.peerCertificate()) << QSslError(QSslError::CertificateUntrusted, socket.peerCertificate()) - << QSslError(QSslError::UnableToVerifyFirstCertificate, socket.peerCertificate());*/ + << QSslError(QSslError::UnableToVerifyFirstCertificate, socket.peerCertificate()); QCOMPARE(socket.sslErrors(), expectedErrors); socket.abort(); @@ -1539,7 +1527,7 @@ void tst_QSslSocket::resetProxy() // dont forget to login QCOMPARE((int) socket.write("USER ftptest\r\n"), 14); - QCOMPARE((int) socket.write("PASS ftP2Ptf\r\n"), 14); + QCOMPARE((int) socket.write("PASS password\r\n"), 15); enterLoop(10); |