Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Unified Diff: net/cert/ct_log_response_parser.cc

Issue 1758823002: Certificate Transparency: Ensure timestamps over 32 bit are handled correctly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing review comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/cert/ct_log_response_parser_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ct_log_response_parser.cc
diff --git a/net/cert/ct_log_response_parser.cc b/net/cert/ct_log_response_parser.cc
index 628eef286be0a1081267b53e504ce050ee28bf77..5baf1b33534dc8abbf1f18950c985cbf6b75eeba 100644
--- a/net/cert/ct_log_response_parser.cc
+++ b/net/cert/ct_log_response_parser.cc
@@ -145,9 +145,7 @@ bool FillSignedTreeHead(const base::Value& json_signed_tree_head,
signed_tree_head->version = SignedTreeHead::V1;
signed_tree_head->tree_size = parsed_sth.tree_size;
- signed_tree_head->timestamp =
- base::Time::UnixEpoch() + base::TimeDelta::FromMilliseconds(
- static_cast<int64_t>(parsed_sth.timestamp));
+ signed_tree_head->timestamp = base::Time::FromJsTime(parsed_sth.timestamp);
signed_tree_head->signature = parsed_sth.signature;
memcpy(signed_tree_head->sha256_root_hash,
parsed_sth.sha256_root_hash.c_str(),
« no previous file with comments | « no previous file | net/cert/ct_log_response_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698