OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_CT_EV_WHITELIST_H_ | 5 #ifndef NET_CERT_CT_EV_WHITELIST_H_ |
6 #define NET_CERT_CT_EV_WHITELIST_H_ | 6 #define NET_CERT_CT_EV_WHITELIST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
12 | 12 |
| 13 namespace base { |
| 14 |
| 15 class Version; |
| 16 |
| 17 } // namespace base |
| 18 |
13 namespace net { | 19 namespace net { |
14 | 20 |
15 namespace ct { | 21 namespace ct { |
16 | 22 |
17 class NET_EXPORT EVCertsWhitelist | 23 class NET_EXPORT EVCertsWhitelist |
18 : public base::RefCountedThreadSafe<EVCertsWhitelist> { | 24 : public base::RefCountedThreadSafe<EVCertsWhitelist> { |
19 public: | 25 public: |
20 // Returns true if the |certificate_hash| appears in the EV certificate hashes | 26 // Returns true if the |certificate_hash| appears in the EV certificate hashes |
21 // whitelist. | 27 // whitelist. |
22 virtual bool ContainsCertificateHash( | 28 virtual bool ContainsCertificateHash( |
23 const std::string& certificate_hash) const = 0; | 29 const std::string& certificate_hash) const = 0; |
24 | 30 |
25 // Returns true if the global EV certificate hashes whitelist is non-empty, | 31 // Returns true if the global EV certificate hashes whitelist is non-empty, |
26 // false otherwise. | 32 // false otherwise. |
27 virtual bool IsValid() const = 0; | 33 virtual bool IsValid() const = 0; |
28 | 34 |
| 35 // Returns the version of the whitelist in use |
| 36 virtual base::Version Version() const = 0; |
| 37 |
29 protected: | 38 protected: |
30 virtual ~EVCertsWhitelist() {} | 39 virtual ~EVCertsWhitelist() {} |
31 | 40 |
32 private: | 41 private: |
33 friend class base::RefCountedThreadSafe<EVCertsWhitelist>; | 42 friend class base::RefCountedThreadSafe<EVCertsWhitelist>; |
34 }; | 43 }; |
35 | 44 |
36 } // namespace ct | 45 } // namespace ct |
37 | 46 |
38 } // namespace net | 47 } // namespace net |
39 | 48 |
40 #endif // NET_CERT_CT_EV_WHITELIST_H_ | 49 #endif // NET_CERT_CT_EV_WHITELIST_H_ |
OLD | NEW |