summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-06-12 10:26:50 +0200
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2020-06-12 14:08:55 +0200
commit56187f1e457e5516e840db699ee4d254528be09a (patch)
tree04ad04a1224f7be6e470de4cd22aaa907a4f47fe /tests/auto/network/ssl
parenta114b133f567afe66b65d2edd3dd3998dfbd1218 (diff)
tst_qsslcertificate - suppress a deprecation warning
In Qt 5 we have to work with the esisting API (QSslCertificate::verify), taking only the peer's chain and the name. We already have a private API to have a CA's list as an additional parameter, the proper fix in Qt6 will also introduce a public complement for this. Pick-to: 5.15 Change-Id: Ib1f75c3056b135c6e6d42f977b5a7034fca658ee Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'tests/auto/network/ssl')
-rw-r--r--tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
index 69a90c9c83..329e3e367d 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -1000,7 +1000,11 @@ void tst_QSslCertificate::verify()
// Verify a valid cert signed by a CA
QList<QSslCertificate> caCerts = QSslCertificate::fromPath(testDataDir + "verify-certs/cacert.pem", QSsl::Pem, QSslCertificate::PatternSyntax::FixedString);
+
+QT_WARNING_PUSH
+QT_WARNING_DISABLE_DEPRECATED
QSslSocket::addDefaultCaCertificate(caCerts.first());
+QT_WARNING_POP
toVerify = QSslCertificate::fromPath(testDataDir + "verify-certs/test-ocsp-good-cert.pem", QSsl::Pem, QSslCertificate::PatternSyntax::FixedString);