Software /
code /
prosody
Comparison
util/sasl/digest-md5.lua @ 2192:fa46d158c95f sasl
Adding a note for possible round trip savings.
author | Tobias Markmann <tm@ayena.de> |
---|---|
date | Fri, 13 Nov 2009 14:31:03 +0100 |
parent | 2191:e79c0ce6cf54 |
child | 2193:8fbbdb11a520 |
comparison
equal
deleted
inserted
replaced
2191:e79c0ce6cf54 | 2192:fa46d158c95f |
---|---|
212 HA2 = md5(A2, true); | 212 HA2 = md5(A2, true); |
213 | 213 |
214 KD = HA1..":"..response["nonce"]..":"..response["nc"]..":"..response["cnonce"]..":"..response["qop"]..":"..HA2 | 214 KD = HA1..":"..response["nonce"]..":"..response["nc"]..":"..response["cnonce"]..":"..response["qop"]..":"..HA2 |
215 local rspauth = md5(KD, true); | 215 local rspauth = md5(KD, true); |
216 self.authenticated = true; | 216 self.authenticated = true; |
217 --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 | |
217 return "challenge", serialize({rspauth = rspauth}); | 218 return "challenge", serialize({rspauth = rspauth}); |
218 else | 219 else |
219 return "failure", "not-authorized", "The response provided by the client doesn't match the one we calculated." | 220 return "failure", "not-authorized", "The response provided by the client doesn't match the one we calculated." |
220 end | 221 end |
221 elseif self.step == 3 then | 222 elseif self.step == 3 then |