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

Unified Diff: net/cert/multi_log_ct_verifier.cc

Issue 76443006: Certificate Transparency: Threading the CT verifier into the SSL client socket. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reverted changes to cert_status_flags, added error code 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
Index: net/cert/multi_log_ct_verifier.cc
diff --git a/net/cert/multi_log_ct_verifier.cc b/net/cert/multi_log_ct_verifier.cc
index 6b12eff9442be7b23714f0f76b38b7b6fa8fd960..61010977199de59cc8d3e63decd54ba565d74326 100644
--- a/net/cert/multi_log_ct_verifier.cc
+++ b/net/cert/multi_log_ct_verifier.cc
@@ -60,25 +60,24 @@ int MultiLogCTVerifier::Verify(
}
ct::LogEntry x509_entry;
- if (!ct::GetX509LogEntry(cert->os_cert_handle(), &x509_entry))
- return has_verified_scts ? OK : ERR_FAILED;
-
- has_verified_scts |= VerifySCTs(
- sct_list_from_ocsp,
- x509_entry,
- ct::SignedCertificateTimestamp::SCT_FROM_OCSP_RESPONSE,
- result);
-
- has_verified_scts |= VerifySCTs(
- sct_list_from_tls_extension,
- x509_entry,
- ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION,
- result);
+ if (ct::GetX509LogEntry(cert->os_cert_handle(), &x509_entry)) {
+ has_verified_scts |= VerifySCTs(
+ sct_list_from_ocsp,
+ x509_entry,
+ ct::SignedCertificateTimestamp::SCT_FROM_OCSP_RESPONSE,
+ result);
+
+ has_verified_scts |= VerifySCTs(
+ sct_list_from_tls_extension,
+ x509_entry,
+ ct::SignedCertificateTimestamp::SCT_FROM_TLS_EXTENSION,
+ result);
+ }
if (has_verified_scts)
return OK;
- return ERR_FAILED;
+ return ERR_CT_NO_SCTS_VERIFIED_OK;
}
bool MultiLogCTVerifier::VerifySCTs(
@@ -119,7 +118,6 @@ bool MultiLogCTVerifier::VerifySingleSCT(
ct::CTVerifyResult* result) {
// Assume this SCT is untrusted until proven otherwise.
-
IDToLogMap::iterator it = logs_.find(sct->log_id);
if (it == logs_.end()) {
DVLOG(1) << "SCT does not match any known log.";

Powered by Google App Engine
This is Rietveld 408576698