summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-03-01 20:17:23 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-03-01 20:17:23 (GMT)
commitca3f25d09a703ff7c27267a5591ce5379886e1c9 (patch)
treeb14c38655ea3c61beb79f8a895fc7e6ce2989a9e /Swiften/Client/ClientSession.cpp
parent5ad284705760c451012a5d896251af538e7bcede (diff)
downloadswift-ca3f25d09a703ff7c27267a5591ce5379886e1c9.zip
swift-ca3f25d09a703ff7c27267a5591ce5379886e1c9.tar.bz2
Some more Sluift enhancements.
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r--Swiften/Client/ClientSession.cpp3
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()));
}