From e681ec9551aaaa102810a789368ae18b4fadb410 Mon Sep 17 00:00:00 2001 From: Jonah BrĂ¼chert Date: Tue, 14 May 2019 13:22:05 +0000 Subject: Port deprecated method setCaCertificates of QSslSocket --- src/client/QXmppOutgoingClient.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/client/QXmppOutgoingClient.cpp') diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index aef68070..1be26a60 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include @@ -141,8 +142,11 @@ void QXmppOutgoingClientPrivate::connectToHost(const QString &host, quint16 port q->info(QString("Connecting to %1:%2").arg(host, QString::number(port))); // override CA certificates if requested - if (!config.caCertificates().isEmpty()) - q->socket()->setCaCertificates(config.caCertificates()); + if (!config.caCertificates().isEmpty()) { + QSslConfiguration newSslConfig; + newSslConfig.setCaCertificates(config.caCertificates()); + q->socket()->setSslConfiguration(newSslConfig); + } // respect proxy q->socket()->setProxy(config.networkProxy()); -- cgit v1.2.3