diff options
| author | Jonah BrĂ¼chert <jbb.prv@gmx.de> | 2019-05-14 13:22:05 +0000 |
|---|---|---|
| committer | LNJ <lnj@kaidan.im> | 2019-09-03 16:10:51 +0200 |
| commit | e681ec9551aaaa102810a789368ae18b4fadb410 (patch) | |
| tree | c7ca5872604cb08e9d08cd0afa1655744906bde3 /src/client/QXmppOutgoingClient.cpp | |
| parent | be4aee23a4ce3e6791a4a46651e714e74b287def (diff) | |
| download | qxmpp-e681ec9551aaaa102810a789368ae18b4fadb410.tar.gz | |
Port deprecated method setCaCertificates of QSslSocket
Diffstat (limited to 'src/client/QXmppOutgoingClient.cpp')
| -rw-r--r-- | src/client/QXmppOutgoingClient.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 <QCryptographicHash> #include <QNetworkProxy> #include <QSslSocket> +#include <QSslConfiguration> #include <QUrl> #include <QDnsLookup> @@ -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()); |
