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

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

Issue 86503002: Certificate Transparency: Logging SCTs to the NetLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot one file. Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « net/cert/ct_verifier.h ('k') | net/cert/multi_log_ct_verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef NET_CERT_MULTI_LOG_CT_VERIFIER_H_ 5 #ifndef NET_CERT_MULTI_LOG_CT_VERIFIER_H_
6 #define NET_CERT_MULTI_LOG_CT_VERIFIER_H_ 6 #define NET_CERT_MULTI_LOG_CT_VERIFIER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
(...skipping 20 matching lines...) Expand all
31 public: 31 public:
32 MultiLogCTVerifier(); 32 MultiLogCTVerifier();
33 virtual ~MultiLogCTVerifier(); 33 virtual ~MultiLogCTVerifier();
34 34
35 void AddLog(scoped_ptr<CTLogVerifier> log_verifier); 35 void AddLog(scoped_ptr<CTLogVerifier> log_verifier);
36 36
37 // CTVerifier implementation: 37 // CTVerifier implementation:
38 virtual int Verify(X509Certificate* cert, 38 virtual int Verify(X509Certificate* cert,
39 const std::string& sct_list_from_ocsp, 39 const std::string& sct_list_from_ocsp,
40 const std::string& sct_list_from_tls_extension, 40 const std::string& sct_list_from_tls_extension,
41 ct::CTVerifyResult* result) OVERRIDE; 41 ct::CTVerifyResult* result,
42 const BoundNetLog& net_log) OVERRIDE;
42 43
43 private: 44 private:
44 // Mapping from a log's ID to the verifier for this log. 45 // Mapping from a log's ID to the verifier for this log.
45 // A log's ID is the SHA-256 of the log's key, as defined in section 3.2. 46 // A log's ID is the SHA-256 of the log's key, as defined in section 3.2.
46 // of RFC6962. 47 // of RFC6962.
47 typedef std::map<std::string, linked_ptr<CTLogVerifier> > IDToLogMap; 48 typedef std::map<std::string, linked_ptr<CTLogVerifier> > IDToLogMap;
48 49
49 // Verify a list of SCTs from |encoded_sct_list| over |expected_entry|, 50 // Verify a list of SCTs from |encoded_sct_list| over |expected_entry|,
50 // placing the verification results in |result|. The SCTs in the list 51 // placing the verification results in |result|. The SCTs in the list
51 // come from |origin| (as will be indicated in the origin field of each SCT). 52 // come from |origin| (as will be indicated in the origin field of each SCT).
52 bool VerifySCTs(const std::string& encoded_sct_list, 53 bool VerifySCTs(const std::string& encoded_sct_list,
53 const ct::LogEntry& expected_entry, 54 const ct::LogEntry& expected_entry,
54 ct::SignedCertificateTimestamp::Origin origin, 55 ct::SignedCertificateTimestamp::Origin origin,
55 ct::CTVerifyResult* result); 56 ct::CTVerifyResult* result);
56 57
57 // Verifies a single, parsed SCT against all logs. 58 // Verifies a single, parsed SCT against all logs.
58 bool VerifySingleSCT( 59 bool VerifySingleSCT(
59 scoped_refptr<ct::SignedCertificateTimestamp> sct, 60 scoped_refptr<ct::SignedCertificateTimestamp> sct,
60 const ct::LogEntry& expected_entry, 61 const ct::LogEntry& expected_entry,
61 ct::CTVerifyResult* result); 62 ct::CTVerifyResult* result);
62 63
63 IDToLogMap logs_; 64 IDToLogMap logs_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(MultiLogCTVerifier); 66 DISALLOW_COPY_AND_ASSIGN(MultiLogCTVerifier);
66 }; 67 };
67 68
68 } // namespace net 69 } // namespace net
69 70
70 #endif // NET_CERT_MULTI_LOG_CT_VERIFIER_H_ 71 #endif // NET_CERT_MULTI_LOG_CT_VERIFIER_H_
OLDNEW
« no previous file with comments | « net/cert/ct_verifier.h ('k') | net/cert/multi_log_ct_verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698