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

Side by Side Diff: net/cert/multi_log_ct_verifier.cc

Issue 337603003: Certificate Transparency: Switch to using a generated CT log list (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/multi_log_ct_verifier.h" 5 #include "net/cert/multi_log_ct_verifier.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "net/base/net_errors.h" 10 #include "net/base/net_errors.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void MultiLogCTVerifier::AddLog(scoped_ptr<CTLogVerifier> log_verifier) { 60 void MultiLogCTVerifier::AddLog(scoped_ptr<CTLogVerifier> log_verifier) {
61 DCHECK(log_verifier); 61 DCHECK(log_verifier);
62 if (!log_verifier) 62 if (!log_verifier)
63 return; 63 return;
64 64
65 linked_ptr<CTLogVerifier> log(log_verifier.release()); 65 linked_ptr<CTLogVerifier> log(log_verifier.release());
66 logs_[log->key_id()] = log; 66 logs_[log->key_id()] = log;
67 } 67 }
68 68
69 void MultiLogCTVerifier::AddLogs(
70 std::vector<linked_ptr<CTLogVerifier> > log_verifiers) {
agl 2014/06/13 00:32:05 const & for the vector?
Eran Messeri 2014/06/17 17:31:41 Switched to using ScopedVector, see if that makes
71 for (std::vector<linked_ptr<CTLogVerifier> >::iterator it =
72 log_verifiers.begin(); it != log_verifiers.end(); ++it) {
73 linked_ptr<CTLogVerifier> log(*it);
74 VLOG(1) << "Adding CT log: " << log->description();
75 logs_[log->key_id()] = log;
76 }
77 }
78
agl 2014/06/13 00:32:05 extra space?
Eran Messeri 2014/06/17 17:31:41 Done, removed.
79
69 int MultiLogCTVerifier::Verify( 80 int MultiLogCTVerifier::Verify(
70 X509Certificate* cert, 81 X509Certificate* cert,
71 const std::string& stapled_ocsp_response, 82 const std::string& stapled_ocsp_response,
72 const std::string& sct_list_from_tls_extension, 83 const std::string& sct_list_from_tls_extension,
73 ct::CTVerifyResult* result, 84 ct::CTVerifyResult* result,
74 const BoundNetLog& net_log) { 85 const BoundNetLog& net_log) {
75 DCHECK(cert); 86 DCHECK(cert);
76 DCHECK(result); 87 DCHECK(result);
77 88
78 result->verified_scts.clear(); 89 result->verified_scts.clear();
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 LogSCTStatusToUMA(ct::SCT_STATUS_INVALID); 223 LogSCTStatusToUMA(ct::SCT_STATUS_INVALID);
213 return false; 224 return false;
214 } 225 }
215 226
216 LogSCTStatusToUMA(ct::SCT_STATUS_OK); 227 LogSCTStatusToUMA(ct::SCT_STATUS_OK);
217 result->verified_scts.push_back(sct); 228 result->verified_scts.push_back(sct);
218 return true; 229 return true;
219 } 230 }
220 231
221 } // namespace net 232 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698