1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 22:21:29 +00:00

Use default EC curves instead of all throughout.

This commit is contained in:
dmiller
2017-10-31 04:26:59 +00:00
parent 091fd560f9
commit 41199b7eea
5 changed files with 10 additions and 21 deletions

View File

@@ -120,12 +120,9 @@ local function test_ccs_injection(host, port, version)
["ciphers"] = stdnse.keys(tls.CIPHERS), ["ciphers"] = stdnse.keys(tls.CIPHERS),
["compressors"] = {"NULL"}, ["compressors"] = {"NULL"},
["extensions"] = { ["extensions"] = {
-- Claim to support every elliptic curve -- Claim to support common elliptic curves
["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"]( ["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](
stdnse.keys(tls.ELLIPTIC_CURVES)), tls.DEFAULT_ELLIPTIC_CURVES),
-- Claim to support every EC point format
["ec_point_formats"] = tls.EXTENSION_HELPERS["ec_point_formats"](
stdnse.keys(tls.EC_POINT_FORMATS)),
}, },
}) })

View File

@@ -515,10 +515,8 @@ end
local function base_extensions(host) local function base_extensions(host)
local tlsname = tls.servername(host) local tlsname = tls.servername(host)
return { return {
-- Claim to support every elliptic curve -- Claim to support common elliptic curves
["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](sorted_keys(tls.ELLIPTIC_CURVES)), ["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](tls.DEFAULT_ELLIPTIC_CURVES),
-- Claim to support every EC point format
["ec_point_formats"] = tls.EXTENSION_HELPERS["ec_point_formats"](sorted_keys(tls.EC_POINT_FORMATS)),
-- Enable SNI if a server name is available -- Enable SNI if a server name is available
["server_name"] = tlsname and tls.EXTENSION_HELPERS["server_name"](tlsname), ["server_name"] = tlsname and tls.EXTENSION_HELPERS["server_name"](tlsname),
} }

View File

@@ -76,10 +76,8 @@ local function testversion(host, port, version)
["ciphers"] = stdnse.keys(tls.CIPHERS), ["ciphers"] = stdnse.keys(tls.CIPHERS),
["compressors"] = {"NULL"}, ["compressors"] = {"NULL"},
["extensions"] = { ["extensions"] = {
-- Claim to support every elliptic curve -- Claim to support common elliptic curves
["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](stdnse.keys(tls.ELLIPTIC_CURVES)), ["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](tls.DEFAULT_ELLIPTIC_CURVES),
-- Claim to support every EC point format
["ec_point_formats"] = tls.EXTENSION_HELPERS["ec_point_formats"](stdnse.keys(tls.EC_POINT_FORMATS)),
["heartbeat"] = "\x01", -- peer_not_allowed_to_send ["heartbeat"] = "\x01", -- peer_not_allowed_to_send
}, },
}) })

View File

@@ -177,10 +177,8 @@ end
local function base_extensions(host) local function base_extensions(host)
local tlsname = tls.servername(host) local tlsname = tls.servername(host)
return { return {
-- Claim to support every elliptic curve -- Claim to support common elliptic curves
["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](sorted_keys(tls.ELLIPTIC_CURVES)), ["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](tls.DEFAULT_ELLIPTIC_CURVES),
-- Claim to support every EC point format
["ec_point_formats"] = tls.EXTENSION_HELPERS["ec_point_formats"](sorted_keys(tls.EC_POINT_FORMATS)),
-- Enable SNI if a server name is available -- Enable SNI if a server name is available
["server_name"] = tlsname and tls.EXTENSION_HELPERS["server_name"](tlsname), ["server_name"] = tlsname and tls.EXTENSION_HELPERS["server_name"](tlsname),
} }

View File

@@ -218,10 +218,8 @@ local function is_vuln(host, port, version)
["ciphers"] = stdnse.keys(tls.CIPHERS), ["ciphers"] = stdnse.keys(tls.CIPHERS),
["compressors"] = {"NULL"}, ["compressors"] = {"NULL"},
["extensions"] = { ["extensions"] = {
-- Claim to support every elliptic curve -- Claim to support common elliptic curves
["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](stdnse.keys(tls.ELLIPTIC_CURVES)), ["elliptic_curves"] = tls.EXTENSION_HELPERS["elliptic_curves"](tls.DEFAULT_ELLIPTIC_CURVES),
-- Claim to support every EC point format
["ec_point_formats"] = tls.EXTENSION_HELPERS["ec_point_formats"](stdnse.keys(tls.EC_POINT_FORMATS)),
["SessionTicket TLS"] = ticket, ["SessionTicket TLS"] = ticket,
}, },
}) })