From fbcb3fc50675b20809ae700236be263f5a38a464 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 11 Jul 2021 10:12:19 +0200 Subject: [PATCH] QSslContext: remove unused fromConfiguration() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All callers use the shared-ptr version these days. Change-Id: I77e9fc9ccb8a57bfebcad7883e9eaff3780748f0 Reviewed-by: Edward Welbourne Reviewed-by: Qt CI Bot Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Timur Pocheptsov --- src/plugins/tls/openssl/qsslcontext_openssl.cpp | 7 ------- src/plugins/tls/openssl/qsslcontext_openssl_p.h | 2 -- src/plugins/tls/openssl/qx509_openssl.cpp | 2 +- 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/plugins/tls/openssl/qsslcontext_openssl.cpp b/src/plugins/tls/openssl/qsslcontext_openssl.cpp index 98ed17acf8..ee69f5aa44 100644 --- a/src/plugins/tls/openssl/qsslcontext_openssl.cpp +++ b/src/plugins/tls/openssl/qsslcontext_openssl.cpp @@ -172,13 +172,6 @@ QSslContext::~QSslContext() q_SSL_SESSION_free(session); } -QSslContext* QSslContext::fromConfiguration(QSslSocket::SslMode mode, const QSslConfiguration &configuration, bool allowRootCertOnDemandLoading) -{ - QSslContext *sslContext = new QSslContext(); - initSslContext(sslContext, mode, configuration, allowRootCertOnDemandLoading); - return sslContext; -} - QSharedPointer QSslContext::sharedFromConfiguration(QSslSocket::SslMode mode, const QSslConfiguration &configuration, bool allowRootCertOnDemandLoading) { QSharedPointer sslContext = QSharedPointer::create(); diff --git a/src/plugins/tls/openssl/qsslcontext_openssl_p.h b/src/plugins/tls/openssl/qsslcontext_openssl_p.h index c350a93f5e..398ab9bb57 100644 --- a/src/plugins/tls/openssl/qsslcontext_openssl_p.h +++ b/src/plugins/tls/openssl/qsslcontext_openssl_p.h @@ -69,8 +69,6 @@ public: ~QSslContext(); - static QSslContext* fromConfiguration(QSslSocket::SslMode mode, const QSslConfiguration &configuration, - bool allowRootCertOnDemandLoading); static QSharedPointer sharedFromConfiguration(QSslSocket::SslMode mode, const QSslConfiguration &configuration, bool allowRootCertOnDemandLoading); static QSharedPointer sharedFromPrivateConfiguration(QSslSocket::SslMode mode, QSslConfigurationPrivate *privConfiguration, diff --git a/src/plugins/tls/openssl/qx509_openssl.cpp b/src/plugins/tls/openssl/qx509_openssl.cpp index bf52c9345c..e9b1450d54 100644 --- a/src/plugins/tls/openssl/qx509_openssl.cpp +++ b/src/plugins/tls/openssl/qx509_openssl.cpp @@ -633,7 +633,7 @@ QList X509CertificateOpenSSL::verify(const QList &ca // certificate will be searched. Make sure to not have expired // certificates mixed with valid ones. // - // See also: QSslContext::fromConfiguration() + // See also: QSslContext::sharedFromConfiguration() if (caCertificate.expiryDate() >= now) { q_X509_STORE_add_cert(certStore, reinterpret_cast(caCertificate.handle())); }