summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r--Swiften/Client/ClientSession.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp
index f03cbaa..b29f63d 100644
--- a/Swiften/Client/ClientSession.cpp
+++ b/Swiften/Client/ClientSession.cpp
@@ -225,4 +225,4 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {
ByteArray finishMessage;
- bool plus = stream->isTLSEncrypted() && streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1-PLUS");
- if (plus) {
+ bool plus = streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1-PLUS");
+ if (stream->isTLSEncrypted()) {
finishMessage = stream->getTLSFinishMessage();
@@ -232,3 +232,3 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) {
SCRAMSHA1ClientAuthenticator* scramAuthenticator = new SCRAMSHA1ClientAuthenticator(s.str(), plus, idnConverter, crypto);
- if (plus) {
+ if (!finishMessage.empty()) {
scramAuthenticator->setTLSChannelBindingData(finishMessage);