Merged libssh2-integration branch

This commit is contained in:
devin 2014-08-14 02:09:00 +00:00
parent f6f59a7cd7
commit 63f997ed28
13 changed files with 1089 additions and 32 deletions

View file

@ -112,6 +112,12 @@ fetch_host_key = function(host, port)
end
end
--- Returns key fingerprint in hexadecimal
fingerprint = function( hostkey )
local fingerprint = openssl.md5(hostkey)
return stdnse.tohex(fingerprint,{separator=":",group=2})
end
--- Format a key fingerprint in hexadecimal.
-- @param fingerprint Key fingerprint.
-- @param algorithm Key algorithm.