From 56187f1e457e5516e840db699ee4d254528be09a Mon Sep 17 00:00:00 2001 From: Timur Pocheptsov Date: Fri, 12 Jun 2020 10:26:50 +0200 Subject: [PATCH] tst_qsslcertificate - suppress a deprecation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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 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);