diff options
| author | Jeremy Lainé <jeremy.laine@m4x.org> | 2014-07-19 10:23:40 +0200 |
|---|---|---|
| committer | Jeremy Lainé <jeremy.laine@m4x.org> | 2014-07-19 10:23:40 +0200 |
| commit | 70e7b6005de3e4a2e0237f18196825d96f4ee4d3 (patch) | |
| tree | 1b017e68025534d194362a6dc206f04a2ca8f553 /src/client/QXmppOutgoingClient.cpp | |
| parent | 68f89992207c592cf0be8567d5c3d5e43157f9b6 (diff) | |
| parent | 07ae4a63307928e1af97b75b3de23530c74beb3f (diff) | |
| download | qxmpp-70e7b6005de3e4a2e0237f18196825d96f4ee4d3.tar.gz | |
Merge branch 'master' of github.com:qxmpp-project/qxmpp
Diffstat (limited to 'src/client/QXmppOutgoingClient.cpp')
| -rw-r--r-- | src/client/QXmppOutgoingClient.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/client/QXmppOutgoingClient.cpp b/src/client/QXmppOutgoingClient.cpp index 0ee1d1af..666b0365 100644 --- a/src/client/QXmppOutgoingClient.cpp +++ b/src/client/QXmppOutgoingClient.cpp @@ -129,7 +129,16 @@ void QXmppOutgoingClientPrivate::connectToHost(const QString &host, quint16 port #endif // connect to host - q->socket()->connectToHost(host, port); + const QXmppConfiguration::StreamSecurityMode localSecurity = q->configuration().streamSecurityMode(); + if (localSecurity == QXmppConfiguration::LegacySSL) { + if (!q->socket()->supportsSsl()) { + q->warning("Not connecting as legacy SSL was requested, but SSL support is not available"); + return; + } + q->socket()->connectToHostEncrypted(host, port); + } else { + q->socket()->connectToHost(host, port); + } } /// Constructs an outgoing client stream. |
