1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-29 10:59:02 +00:00

Fix digest auth when algorithm is 'md5'. Closes #1209

This commit is contained in:
dmiller
2018-05-14 21:29:36 +00:00
parent 48ace808f6
commit 670e24ddb7
3 changed files with 5 additions and 2 deletions

View File

@@ -804,7 +804,7 @@ SipAuth = {
assert(self.uri, "SipAuth: No uri specified")
local result
if ( self.algorithm == "MD5" ) then
if ( self.algorithm:upper() == "MD5" ) then
local HA1 = select(2, bin.unpack("H16", openssl.md5(self.username .. ":" .. self.realm .. ":" .. self.password)))
local HA2 = select(2, bin.unpack("H16", openssl.md5(self.method .. ":" .. self.uri)))
result = openssl.md5(HA1:lower() .. ":" .. self.nonce ..":" .. HA2:lower())