1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 00:49:01 +00:00

Add support for SHA256 hostkey fingerprints. Closes #1644

This commit is contained in:
dmiller
2019-06-26 03:22:24 +00:00
parent 294f81a390
commit 9aebe62edb
3 changed files with 18 additions and 3 deletions

View File

@@ -318,7 +318,8 @@ fetch_host_key = function( host, port, key_type )
socket:close()
return { key=base64.enc(public_host_key), key_type=key_type, fp_input=public_host_key, bits=bits,
full_key=('%s %s'):format(key_type,base64.enc(public_host_key)),
algorithm=algorithm, fingerprint=openssl.md5(public_host_key) }
algorithm=algorithm, fingerprint=openssl.md5(public_host_key),
fp_sha256=openssl.digest("sha256",public_host_key)}
end
-- constants