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

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

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: Addressing final nit 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 #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
11 #include "base/memory/linked_ptr.h" 11 #include "base/memory/linked_ptr.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/scoped_vector.h"
13 #include "net/base/net_export.h" 14 #include "net/base/net_export.h"
14 #include "net/cert/ct_verifier.h" 15 #include "net/cert/ct_verifier.h"
15 #include "net/cert/signed_certificate_timestamp.h" 16 #include "net/cert/signed_certificate_timestamp.h"
16 17
17 namespace net { 18 namespace net {
18 19
19 namespace ct { 20 namespace ct {
20 struct LogEntry; 21 struct LogEntry;
21 } // namespace ct 22 } // namespace ct
22 23
23 class CTLogVerifier; 24 class CTLogVerifier;
24 25
25 // A Certificate Transparency verifier that can verify Signed Certificate 26 // A Certificate Transparency verifier that can verify Signed Certificate
26 // Timestamps from multiple logs. 27 // Timestamps from multiple logs.
27 // There should be a global instance of this class and for all known logs, 28 // There should be a global instance of this class and for all known logs,
28 // AddLog should be called with a CTLogVerifier (which is created from the 29 // AddLog should be called with a CTLogVerifier (which is created from the
29 // log's public key). 30 // log's public key).
30 class NET_EXPORT MultiLogCTVerifier : public CTVerifier { 31 class NET_EXPORT MultiLogCTVerifier : public CTVerifier {
31 public: 32 public:
32 MultiLogCTVerifier(); 33 MultiLogCTVerifier();
33 virtual ~MultiLogCTVerifier(); 34 virtual ~MultiLogCTVerifier();
34 35
35 void AddLog(scoped_ptr<CTLogVerifier> log_verifier); 36 void AddLog(scoped_ptr<CTLogVerifier> log_verifier);
37 void AddLogs(ScopedVector<CTLogVerifier> log_verifiers);
36 38
37 // CTVerifier implementation: 39 // CTVerifier implementation:
38 virtual int Verify(X509Certificate* cert, 40 virtual int Verify(X509Certificate* cert,
39 const std::string& stapled_ocsp_response, 41 const std::string& stapled_ocsp_response,
40 const std::string& sct_list_from_tls_extension, 42 const std::string& sct_list_from_tls_extension,
41 ct::CTVerifyResult* result, 43 ct::CTVerifyResult* result,
42 const BoundNetLog& net_log) OVERRIDE; 44 const BoundNetLog& net_log) OVERRIDE;
43 45
44 private: 46 private:
45 // Mapping from a log's ID to the verifier for this log. 47 // Mapping from a log's ID to the verifier for this log.
(...skipping 16 matching lines...) Expand all
62 ct::CTVerifyResult* result); 64 ct::CTVerifyResult* result);
63 65
64 IDToLogMap logs_; 66 IDToLogMap logs_;
65 67
66 DISALLOW_COPY_AND_ASSIGN(MultiLogCTVerifier); 68 DISALLOW_COPY_AND_ASSIGN(MultiLogCTVerifier);
67 }; 69 };
68 70
69 } // namespace net 71 } // namespace net
70 72
71 #endif // NET_CERT_MULTI_LOG_CT_VERIFIER_H_ 73 #endif // NET_CERT_MULTI_LOG_CT_VERIFIER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698