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