OLD | NEW |
---|---|
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 15 matching lines...) Expand all Loading... | |
26 // Timestamps from multiple logs. | 26 // Timestamps from multiple logs. |
27 // There should be a global instance of this class and for all known logs, | 27 // 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 | 28 // AddLog should be called with a CTLogVerifier (which is created from the |
29 // log's public key). | 29 // log's public key). |
30 class NET_EXPORT MultiLogCTVerifier : public CTVerifier { | 30 class NET_EXPORT MultiLogCTVerifier : public CTVerifier { |
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 void AddLogs(std::vector<linked_ptr<CTLogVerifier> > log_verifiers); | |
Ryan Sleevi
2014/06/17 01:02:04
Feels like too much coupling here. I dislike the l
Eran Messeri
2014/06/17 17:31:41
Good point. I've switched to using ScopedVector an
| |
36 | 37 |
37 // CTVerifier implementation: | 38 // CTVerifier implementation: |
38 virtual int Verify(X509Certificate* cert, | 39 virtual int Verify(X509Certificate* cert, |
39 const std::string& stapled_ocsp_response, | 40 const std::string& stapled_ocsp_response, |
40 const std::string& sct_list_from_tls_extension, | 41 const std::string& sct_list_from_tls_extension, |
41 ct::CTVerifyResult* result, | 42 ct::CTVerifyResult* result, |
42 const BoundNetLog& net_log) OVERRIDE; | 43 const BoundNetLog& net_log) OVERRIDE; |
43 | 44 |
44 private: | 45 private: |
45 // Mapping from a log's ID to the verifier for this log. | 46 // Mapping from a log's ID to the verifier for this log. |
(...skipping 16 matching lines...) Expand all Loading... | |
62 ct::CTVerifyResult* result); | 63 ct::CTVerifyResult* result); |
63 | 64 |
64 IDToLogMap logs_; | 65 IDToLogMap logs_; |
65 | 66 |
66 DISALLOW_COPY_AND_ASSIGN(MultiLogCTVerifier); | 67 DISALLOW_COPY_AND_ASSIGN(MultiLogCTVerifier); |
67 }; | 68 }; |
68 | 69 |
69 } // namespace net | 70 } // namespace net |
70 | 71 |
71 #endif // NET_CERT_MULTI_LOG_CT_VERIFIER_H_ | 72 #endif // NET_CERT_MULTI_LOG_CT_VERIFIER_H_ |
OLD | NEW |