1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-03 05:09:14 +00:00

Add support for ECDSA to ssh-hostkey.nse.

Patch by Adam Števko. http://seclists.org/nmap-dev/2012/q4/181
This commit is contained in:
david
2012-10-31 17:57:26 +00:00
parent d5f3fb6745
commit 4c298e6e67
3 changed files with 20 additions and 0 deletions

View File

@@ -215,6 +215,15 @@ fetch_host_key = function( host, port, key_type )
local n
_, _, _, n = bin.unpack( ">aaa", public_host_key )
bits = openssl.bignum_bin2bn( n ):num_bits()
elseif key_type == 'ecdsa-sha2-nistp256' then
algorithm = "ECDSA"
bits = "256"
elseif key_type == 'ecdsa-sha2-nistp384' then
algorithm = "ECDSA"
bits = "384"
elseif key_type == 'ecdsa-sha2-nistp521' then
algorithm = "ECDSA"
bits = "521"
else
stdnse.print_debug( "Unsupported key type: %s", key_type )
end