summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2021-01-08 14:48:43 +0100
committerHeikki Halmet <heikki.halmet@qt.io>2021-03-22 12:30:55 +0200
commit90267af5df513e7b8301610c5fffcb03dfabf4ac (patch)
tree590293df151807547dc9f748d90fc04876041389
parent4c32d983b950547bc4ff9bf6510aeda11b97c22d (diff)
tst_QSslSocket::setSslConfiguration - skip if SecureTransport is in use
SecureTransport does not allow deprecated digest algorithms, and (depending on ST version) it may or may not accept our server's certificate. Funnily enough, they 'fluctuate' between versions again and again. Fixes: QTBUG-89922 Change-Id: Ie5fbfca316806bd5000ce2d128b81b718bb36624 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 3d5f86e77d0740d72cd8922c7b1d4f8cde460ee1) Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
-rw-r--r--tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
index 2bfb905620..dd75a3763a 100644
--- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp
@@ -1657,11 +1657,15 @@ void tst_QSslSocket::setSslConfiguration_data()
QTest::newRow("empty") << QSslConfiguration() << false;
QSslConfiguration conf = QSslConfiguration::defaultConfiguration();
QTest::newRow("default") << conf << false; // does not contain test server cert
+#if !QT_CONFIG(securetransport)
QList<QSslCertificate> testServerCert = QSslCertificate::fromPath(httpServerCertChainPath());
conf.setCaCertificates(testServerCert);
QTest::newRow("set-root-cert") << conf << true;
conf.setProtocol(QSsl::SecureProtocols);
QTest::newRow("secure") << conf << true;
+#else
+ qWarning("Skipping the cases with certificate, SecureTransport does not like old certificate on the test server");
+#endif
}
void tst_QSslSocket::setSslConfiguration()