Comparison

util/sasl.lua @ 278:770a78cd38d7

Forward response stanzas to sasl.lua and some other stuff.
author Tobias Markmann <tm@ayena.de>
date Mon, 10 Nov 2008 16:28:15 +0100
parent 277:00c2fc751f50
child 280:516f4c901991
comparison
equal deleted inserted replaced
277:00c2fc751f50 278:770a78cd38d7
137 else 137 else
138 error("No digest-uri") 138 error("No digest-uri")
139 end 139 end
140 140
141 -- compare response_value with own calculation 141 -- compare response_value with own calculation
142 local A1-- = H(response["username"]..":"..realm-value, ":", passwd } ), 142 --local A1 = usermanager.get_md5(response["username"], hostname)..":"..response["nonce"]..response["cnonce"]
143 -- ":", nonce-value, ":", cnonce-value) 143 local A1 = H("tobias:luaetta.ath.cx:tobias")..":"..response["nonce"]..response["cnonce"]
144 local A2 144 local A2 = "AUTHENTICATE:"..response["digest-uri"]
145 145
146 --local response_value = HEX(KD(HEX(H(A1)), response["nonce"]..":"..response["nonce-count"]..":"..response["cnonce-value"]..":"..response["qop"]..":"..HEX(H(A2)))) 146 local response_value = HEX(KD(HEX(H(A1)), response["nonce"]..":"..response["nonce-count"]..":"..response["cnonce-value"]..":"..response["qop"]..":"..HEX(H(A2))))
147
148 log("debug", "response_value: "..response_value);
147 149
148 if response["qop"] == "auth" then 150 if response["qop"] == "auth" then
149 151
150 else 152 else
151 153