diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-10 22:06:59 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-10 22:06:59 (GMT) |
commit | f76e39f30966279a10a9ba97271cebdc3cba2c4d (patch) | |
tree | 486514e62ce717b607b9af8a13db3b0fceddf46c /Swiften/Client/ClientSession.cpp | |
parent | 80a67051508b7a2f59e0ded9d1dd4df490d44ec2 (diff) | |
download | swift-contrib-f76e39f30966279a10a9ba97271cebdc3cba2c4d.zip swift-contrib-f76e39f30966279a10a9ba97271cebdc3cba2c4d.tar.bz2 |
Fix error messages.
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index a185ea0..f7fc073 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -67,9 +67,14 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) { stream->writeElement(boost::shared_ptr<StartTLSRequest>(new StartTLSRequest())); } else if (streamFeatures->hasAuthenticationMechanisms()) { - if (stream->hasTLSCertificate() && streamFeatures->hasAuthenticationMechanism("EXTERNAL")) { + if (stream->hasTLSCertificate()) { + if (streamFeatures->hasAuthenticationMechanism("EXTERNAL")) { state = Authenticating; stream->writeElement(boost::shared_ptr<Element>(new AuthRequest("EXTERNAL", ""))); + } + else { + finishSession(Error::TLSClientCertificateError); + } } else if (streamFeatures->hasAuthenticationMechanism("PLAIN")) { state = WaitingForCredentials; |