From 3d5f86e77d0740d72cd8922c7b1d4f8cde460ee1 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 8 Jan 2021 14:48:43 +0100 Subject: [PATCH] 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 --- tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp index 13a4b17761d..1fce9df3fc3 100644 --- a/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp @@ -1660,11 +1660,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 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()