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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user