1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-25 23:59:01 +00:00

Pass dates directly to format_timestamp, avoid timestamp overflow

Should fix: http://seclists.org/nmap-dev/2014/q2/184
This commit is contained in:
dmiller
2014-05-21 15:04:13 +00:00
parent 125d84fd67
commit 974b4430e2

View File

@@ -137,7 +137,7 @@ function date_to_string(date)
if type(date) == "string" then
return string.format("Can't parse; string is \"%s\"", date)
else
return stdnse.format_timestamp(stdnse.date_to_timestamp(date, 0), 0)
return stdnse.format_timestamp(date)
end
end
@@ -193,7 +193,7 @@ local function output_tab(cert)
if type(v)=="string" then
o.validity[k] = v
else
o.validity[k] = stdnse.format_timestamp(stdnse.date_to_timestamp(v, 0), 0)
o.validity[k] = stdnse.format_timestamp(v)
end
end
o.md5 = stdnse.tohex(cert:digest("md5"))