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

Unified Diff: net/cert/single_log_ct_verifier.cc

Issue 71633002: Convert SignedCertificateClass to be ref_counted, and add an SCTStore in which to store them. Add S… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: few lint fixes Created 7 years, 1 month 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 | « net/cert/signed_certificate_timestamp.cc ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/single_log_ct_verifier.cc
diff --git a/net/cert/single_log_ct_verifier.cc b/net/cert/single_log_ct_verifier.cc
index c6e7e6f9924cb673abf0d3aa26eb1176f0b6afcb..15913d9cee7c1ac345e73558d930579062ea630c 100644
--- a/net/cert/single_log_ct_verifier.cc
+++ b/net/cert/single_log_ct_verifier.cc
@@ -70,7 +70,7 @@ bool SingleLogCTVerifier::VerifySCTs(const std::string& encoded_sct_list,
for (std::vector<base::StringPiece>::const_iterator it = sct_list.begin();
it != sct_list.end(); ++it) {
base::StringPiece temp_sct(*it);
- ct::SignedCertificateTimestamp decoded_sct;
+ scoped_refptr<ct::SignedCertificateTimestamp> decoded_sct;
if (!DecodeSignedCertificateTimestamp(&temp_sct, &decoded_sct)) {
// XXX(rsleevi): Should we really just skip over bad SCTs?
continue;
@@ -78,12 +78,12 @@ bool SingleLogCTVerifier::VerifySCTs(const std::string& encoded_sct_list,
// Assume this SCT is untrusted until proven otherwise.
result->unverified_scts.push_back(decoded_sct);
- if (!log_->Verify(expected_entry, decoded_sct)) {
+ if (!log_->Verify(expected_entry, *decoded_sct.get())) {
DVLOG(1) << "Unable to verify SCT signature.";
continue;
}
- if (decoded_sct.timestamp + base::TimeDelta::FromSeconds(1) >
+ if (decoded_sct->timestamp + base::TimeDelta::FromSeconds(1) >
base::Time::Now()) {
DVLOG(1) << "SCT is from the future!";
continue;
« no previous file with comments | « net/cert/signed_certificate_timestamp.cc ('k') | net/socket/ssl_client_socket_nss.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698