1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-15 20:29:03 +00:00

Integrate David's ssl-enum-ciphers improvements

From this thread: http://seclists.org/nmap-dev/2014/q1/105

* Extensions now better supported in tls.lua
* ssl-enum-ciphers sends all EC options to ensure servers reply with
  supported EC suites
* tls.lua supports multiple messages of a single type within 1 record
* tls.record_buffer will read an entire TLS record into a buffer
* ssl-date and tls-nextprotoneg updated to use tls.record_buffer
This commit is contained in:
dmiller
2014-01-30 18:12:14 +00:00
parent 83fd814a2c
commit 4eaa21e7cb
4 changed files with 254 additions and 100 deletions

View File

@@ -94,7 +94,7 @@ local client_hello = function(host, port)
end
-- Read response
status, response = sock:receive()
status, response, err = tls.record_buffer(sock)
if not status then
stdnse.print_debug("Couldn't receive: %s", err)
sock:close()
@@ -112,12 +112,15 @@ local extract_time = function(response)
return nil
end
if record.type == "handshake" and record.body.type == "server_hello" then
return true, record.body.time
else
stdnse.print_debug("%s: Server response was not server_hello", SCRIPT_NAME)
return nil
if record.type == "handshake" then
for _, body in ipairs(record.body) do
if body.type == "server_hello" then
return true, body.time
end
end
end
stdnse.print_debug("%s: Server response was not server_hello", SCRIPT_NAME)
return nil
end
action = function(host, port)