From 90267af5df513e7b8301610c5fffcb03dfabf4ac Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 8 Jan 2021 14:48:43 +0100 Subject: tst_QSslSocket::setSslConfiguration - skip if SecureTransport is in use MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (cherry picked from commit 3d5f86e77d0740d72cd8922c7b1d4f8cde460ee1) Reviewed-by: Tony Sarajärvi Reviewed-by: Qt CI Bot --- 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 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 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() -- cgit v1.2.3