From 3ad23dd378b7b769ff65c6bf297d2547184e78e2 Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Wed, 11 Aug 2010 17:08:58 +0000 Subject: only enable TLS if supported by BOTH parties --- src/QXmppStream.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/QXmppStream.cpp') diff --git a/src/QXmppStream.cpp b/src/QXmppStream.cpp index d1456b23..4e655885 100644 --- a/src/QXmppStream.cpp +++ b/src/QXmppStream.cpp @@ -376,11 +376,10 @@ void QXmppStream::parser(const QByteArray& data) } if (d->socket->supportsSsl() && - (remoteSecurity == QXmppConfiguration::TLSRequired || - localSecurity != QXmppConfiguration::TLSDisabled)) + remoteSecurity != QXmppConfiguration::TLSDisabled && + localSecurity != QXmppConfiguration::TLSDisabled) { - // enable TLS as it is required by the server - // or supported by the client + // enable TLS as it is support by both parties sendToServer(""); return; } -- cgit v1.2.3