mirror of
https://github.com/nmap/nmap.git
synced 2026-08-30 05:37:05 +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:
parent
125d84fd67
commit
974b4430e2
1 changed files with 2 additions and 2 deletions
|
|
@ -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"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue