From 89734289d53020ac963e9ab098fc89d0ea3c0783 Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Tue, 1 Dec 2020 17:22:18 +0100 Subject: tst_qnetworkreply: cleanup BLACKLIST MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Which contains a lot of 'macos'/'osx' black-listed auto-tests. They mostly fail with SecureTransport (on BigSur) because SecTrustEvaluate() does not like our old certificate. Instead, since SecureTransport is deprecated anyway and we are not planning to develop it in future, skip the related auto-test depending on QT_CONFIG(securetransport). Task-number: QTBUG-88943 Change-Id: I5f6cb7b2d0ea15c445603c1ff3e1700f123c28d1 Reviewed-by: MÃ¥rten Nordheim --- tests/auto/network/access/qnetworkreply/BLACKLIST | 18 -------------- .../access/qnetworkreply/tst_qnetworkreply.cpp | 28 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 19 deletions(-) (limited to 'tests/auto/network/access/qnetworkreply') diff --git a/tests/auto/network/access/qnetworkreply/BLACKLIST b/tests/auto/network/access/qnetworkreply/BLACKLIST index 51a662db11..4f356a8596 100644 --- a/tests/auto/network/access/qnetworkreply/BLACKLIST +++ b/tests/auto/network/access/qnetworkreply/BLACKLIST @@ -48,18 +48,12 @@ macos macos [downloadProgress] macos -[encrypted] -macos [httpCanReadLine] macos [httpRecursiveCreation] osx [httpWithNoCredentialUsage] macos -[ignoreSslErrorsList] -osx -[ignoreSslErrorsListWithSlot] -osx [ioGetFromBuiltinHttp] osx [ioGetFromHttp] @@ -84,18 +78,10 @@ macos macos [postToHttpSynchronous] macos -[postToHttps] -osx -[postToHttpsMultipart] -osx -[postToHttpsSynchronous] -osx [putGetDeleteGetFromHttp] macos [putToHttpSynchronous] macos -[putToHttps] -osx [putToHttpsSynchronous] osx [putWithRateLimiting] @@ -112,9 +98,5 @@ osx osx [sendCustomRequestToHttp] macos -[sslConfiguration] -osx -[synchronousRequest] -osx [backgroundRequestConnectInBackground] osx diff --git a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp index 08e9dd581d..fb64eedc58 100644 --- a/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp @@ -2782,6 +2782,9 @@ void tst_QNetworkReply::putToHttpMultipart() #ifndef QT_NO_SSL void tst_QNetworkReply::putToHttps_data() { +#if QT_CONFIG(securetransport) + QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server"); +#endif uniqueExtension = createUniqueExtension(); putToFile_data(); } @@ -2823,6 +2826,9 @@ void tst_QNetworkReply::putToHttps() void tst_QNetworkReply::putToHttpsSynchronous_data() { +#if QT_CONFIG(securetransport) + QSKIP("SecTrustEvalueate() retruns recoverable error, update the server's certificate"); +#endif uniqueExtension = createUniqueExtension(); putToFile_data(); } @@ -2868,6 +2874,9 @@ void tst_QNetworkReply::putToHttpsSynchronous() void tst_QNetworkReply::postToHttps_data() { +#if QT_CONFIG(securetransport) + QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server"); +#endif putToFile_data(); } @@ -2899,6 +2908,9 @@ void tst_QNetworkReply::postToHttps() void tst_QNetworkReply::postToHttpsSynchronous_data() { +#if QT_CONFIG(securetransport) + QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server"); +#endif putToFile_data(); } @@ -2935,6 +2947,9 @@ void tst_QNetworkReply::postToHttpsSynchronous() void tst_QNetworkReply::postToHttpsMultipart_data() { +#if QT_CONFIG(securetransport) + QSKIP("SecTrustEvaluate() returns recoverable error, update the certificate on server"); +#endif postToHttpMultipart_data(); } @@ -6453,16 +6468,23 @@ void tst_QNetworkReply::sslConfiguration_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) + qWarning("SecTrustEvaluate() will fail, update the certificate on server"); +#else QList testServerCert = QSslCertificate::fromPath(testDataDir + certsFilePath); conf.setCaCertificates(testServerCert); + QTest::newRow("set-root-cert") << conf << true; conf.setProtocol(QSsl::SecureProtocols); QTest::newRow("secure") << conf << true; +#endif } void tst_QNetworkReply::encrypted() { - qDebug() << QtNetworkSettings::httpServerName(); +#if QT_CONFIG(securetransport) + QSKIP("SecTrustEvalute() fails with old server certificate"); +#endif QUrl url("https://" + QtNetworkSettings::httpServerName()); QNetworkRequest request(url); QNetworkReply *reply = manager.get(request); @@ -7731,11 +7753,15 @@ void tst_QNetworkReply::synchronousRequest_data() << QString("text/plain"); #ifndef QT_NO_SSL +#if QT_CONFIG(securetransport) + qWarning("Skipping https scheme, SecTrustEvalue() fails, update the certificate on server"); +#else QTest::newRow("https") << QUrl("https://" + QtNetworkSettings::httpServerName() + "/qtest/rfc3252.txt") << QString("file:" + testDataDir + "/rfc3252.txt") << true << QString("text/plain"); +#endif #endif QTest::newRow("data") -- cgit v1.2.3