Diff

util/sasl/digest-md5.lua @ 2211:6094a4e2b6f3

Reduce needed roundtrips during DIGEST-MD5 login.
author Tobias Markmann <tm@ayena.de>
date Thu, 19 Nov 2009 17:20:38 +0100
parent 2206:5f54100bb426
child 2212:7cb6460b18d8
child 2568:25e1a544a096
line wrap: on
line diff
--- a/util/sasl/digest-md5.lua	Thu Nov 19 17:17:52 2009 +0100
+++ b/util/sasl/digest-md5.lua	Thu Nov 19 17:20:38 2009 +0100
@@ -214,8 +214,7 @@
 			KD = HA1..":"..response["nonce"]..":"..response["nc"]..":"..response["cnonce"]..":"..response["qop"]..":"..HA2
 			local rspauth = md5(KD, true);
 			self.authenticated = true;
-			--TODO: considering sending the rspauth in a success node for saving one roundtrip; allowed according to http://tools.ietf.org/html/draft-saintandre-rfc3920bis-09#section-7.3.6
-			return "challenge", serialize({rspauth = rspauth});
+			return "success", serialize({rspauth = rspauth});
 		else
 			return "failure", "not-authorized", "The response provided by the client doesn't match the one we calculated."
 		end