summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-11-10 22:06:59 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-10 22:06:59 (GMT)
commitf76e39f30966279a10a9ba97271cebdc3cba2c4d (patch)
tree486514e62ce717b607b9af8a13db3b0fceddf46c /Swiften/Client/ClientSession.cpp
parent80a67051508b7a2f59e0ded9d1dd4df490d44ec2 (diff)
downloadswift-f76e39f30966279a10a9ba97271cebdc3cba2c4d.zip
swift-f76e39f30966279a10a9ba97271cebdc3cba2c4d.tar.bz2
Fix error messages.
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r--Swiften/Client/ClientSession.cpp7
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;