1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-04 21:59:02 +00:00

Add tls.servername script-arg. Closes #540

This commit is contained in:
dmiller
2016-12-05 17:44:32 +00:00
parent 07c840d9ec
commit e4717fa068
8 changed files with 58 additions and 56 deletions

View File

@@ -633,11 +633,10 @@ local function get_dhe_params(host, port, protocol, ciphers)
local t = {}
local pos = 1
t.protocol = protocol
t.extensions = {}
if host.targetname then
t.extensions.server_name = tls.EXTENSION_HELPERS.server_name(host.targetname)
end
local tlsname = tls.servername(host)
t.extensions = {
server_name = tlsname and tls.EXTENSION_HELPERS["server_name"](tlsname),
}
-- Keep ClientHello record size below 255 bytes and the number of ciphersuites
-- to 64 or less in order to avoid implementation issues with some TLS servers