diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-21 00:59:21 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-21 01:01:05 (GMT) |
commit | 2c8bfd7c49bd16bebbf0b89c01fce7817afab74f (patch) | |
tree | 1a7c73d4aaf81a1e243ee6f50de0385e9e6a081f /Swiften/Client | |
parent | fe007f1afdaf29c7ce0302da2984b5611503a822 (diff) | |
download | swift-contrib-2c8bfd7c49bd16bebbf0b89c01fce7817afab74f.zip swift-contrib-2c8bfd7c49bd16bebbf0b89c01fce7817afab74f.tar.bz2 |
Implemented SCRAM-SHA-1 for real now.
Still need to do some cleanup and polishing.
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index f4c4a22..fb80754 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -80,12 +80,12 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) { finishSession(Error::TLSClientCertificateError); } } - /*else if (streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1")) { + else if (streamFeatures->hasAuthenticationMechanism("SCRAM-SHA-1")) { // FIXME: Use a real nonce - authenticator = new SCRAMSHA1ClientAuthenticator(ByteArray("\x01\x02\x03\x04\x05\x06\x07\x08", 8)); + authenticator = new SCRAMSHA1ClientAuthenticator("ClientNonce"); state = WaitingForCredentials; onNeedCredentials(); - }*/ + } else if (streamFeatures->hasAuthenticationMechanism("PLAIN")) { authenticator = new PLAINClientAuthenticator(); state = WaitingForCredentials; @@ -131,6 +131,7 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) { } } else if (dynamic_cast<AuthSuccess*>(element.get())) { + // TODO: Check success data with authenticator checkState(Authenticating); state = WaitingForStreamStart; delete authenticator; |