aboutsummaryrefslogtreecommitdiff
path: root/src/QXmppStream.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-08-11 17:08:58 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-08-11 17:08:58 +0000
commit3ad23dd378b7b769ff65c6bf297d2547184e78e2 (patch)
treeaf0a0ac84d6d5f36e3831ee5ce4399d31febdcf1 /src/QXmppStream.cpp
parentf9491c7f2530417c24a913bc56efd0b756dd3d3d (diff)
downloadqxmpp-3ad23dd378b7b769ff65c6bf297d2547184e78e2.tar.gz
only enable TLS if supported by BOTH parties
Diffstat (limited to 'src/QXmppStream.cpp')
-rw-r--r--src/QXmppStream.cpp7
1 files changed, 3 insertions, 4 deletions
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("<starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>");
return;
}