diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-03-01 20:17:23 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-03-01 20:17:23 (GMT) |
commit | ca3f25d09a703ff7c27267a5591ce5379886e1c9 (patch) | |
tree | b14c38655ea3c61beb79f8a895fc7e6ce2989a9e /Swiften/Client/ClientSession.cpp | |
parent | 5ad284705760c451012a5d896251af538e7bcede (diff) | |
download | swift-contrib-ca3f25d09a703ff7c27267a5591ce5379886e1c9.zip swift-contrib-ca3f25d09a703ff7c27267a5591ce5379886e1c9.tar.bz2 |
Some more Sluift enhancements.
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index 8d9e678..e1c1d8e 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -50,6 +50,7 @@ ClientSession::ClientSession( stream(stream), allowPLAINOverNonTLS(false), useStreamCompression(true), + useTLS(UseTLSWhenAvailable), needSessionStart(false), needResourceBind(false), needAcking(false), @@ -170,7 +171,7 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) { return; } - if (streamFeatures->hasStartTLS() && stream->supportsTLSEncryption()) { + if (streamFeatures->hasStartTLS() && stream->supportsTLSEncryption() && useTLS != NeverUseTLS) { state = WaitingForEncrypt; stream->writeElement(boost::shared_ptr<StartTLSRequest>(new StartTLSRequest())); } |