From 88e35246fed9345f540e7f6eb749097fd74f5cfb Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Sun, 6 Apr 2014 12:21:40 +0200 Subject: add support for legacy SSL --- src/client/QXmppOutgoingClient.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/client/QXmppOutgoingClient.cpp') 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. -- cgit v1.2.3