summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/ssl/qsslcertificate
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2020-06-12 10:26:50 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-06-12 17:00:06 +0000
commitc6e42357721c5b621bbe177a55d0178e7709d116 (patch)
tree4b24ffc7d99ee6fd6018b49fab2ccc7bbcf6f758 /tests/auto/network/ssl/qsslcertificate
parent0ecf137b3f785d80e674dd5ec27a47973fd472a6 (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. Change-Id: Ib1f75c3056b135c6e6d42f977b5a7034fca658ee Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 56187f1e457e5516e840db699ee4d254528be09a) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests/auto/network/ssl/qsslcertificate')
-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 6cd730bd38..e89b7f5a44 100644
--- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp
@@ -1081,7 +1081,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);