1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-24 08:29:04 +00:00

ssl-known-key: return if sslcert fails

This commit is contained in:
dmiller
2012-08-30 23:29:06 +00:00
parent fe25ec912f
commit 9c199916b8

View File

@@ -117,7 +117,8 @@ action = function(host, port)
-- Get SSL certificate.
local status, cert = sslcert.getCertificate(host, port)
if not status then
stdnse.print_debug(2, "sslcert.getCertificate error: %s", cert)
stdnse.print_debug(1, "sslcert.getCertificate error: %s", cert)
return
end
local fingerprint = cert:digest("sha1")
local fingerprint_fmt = stdnse.tohex(fingerprint, {separator=" ", group=4})