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>
This commit is contained in:
Timur Pocheptsov 2021-01-08 14:48:43 +01:00 committed by Heikki Halmet
parent 4c32d983b9
commit 90267af5df

View File

@ -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()