OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_EV_ROOT_CA_METADATA_H_ | 5 #ifndef NET_CERT_EV_ROOT_CA_METADATA_H_ |
6 #define NET_CERT_EV_ROOT_CA_METADATA_H_ | 6 #define NET_CERT_EV_ROOT_CA_METADATA_H_ |
7 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(USE_NSS) || defined(OS_IOS) | 10 #if defined(USE_NSS) || defined(OS_IOS) |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // returns true on success. | 57 // returns true on success. |
58 bool RemoveEVCA(const SHA1HashValue& fingerprint); | 58 bool RemoveEVCA(const SHA1HashValue& fingerprint); |
59 | 59 |
60 private: | 60 private: |
61 friend struct base::DefaultLazyInstanceTraits<EVRootCAMetadata>; | 61 friend struct base::DefaultLazyInstanceTraits<EVRootCAMetadata>; |
62 | 62 |
63 EVRootCAMetadata(); | 63 EVRootCAMetadata(); |
64 ~EVRootCAMetadata(); | 64 ~EVRootCAMetadata(); |
65 | 65 |
66 #if defined(USE_NSS) || defined(OS_IOS) | 66 #if defined(USE_NSS) || defined(OS_IOS) |
67 typedef std::map<SHA1HashValue, std::vector<PolicyOID>, | 67 typedef std::map<SHA1HashValue, std::vector<PolicyOID>, SHA1HashValueLessThan> |
68 SHA1HashValueLessThan> PolicyOIDMap; | 68 PolicyOIDMap; |
69 | 69 |
70 // RegisterOID registers |policy|, a policy OID in dotted string form, and | 70 // RegisterOID registers |policy|, a policy OID in dotted string form, and |
71 // writes the memoized form to |*out|. It returns true on success. | 71 // writes the memoized form to |*out|. It returns true on success. |
72 static bool RegisterOID(const char* policy, PolicyOID* out); | 72 static bool RegisterOID(const char* policy, PolicyOID* out); |
73 | 73 |
74 PolicyOIDMap ev_policy_; | 74 PolicyOIDMap ev_policy_; |
75 std::set<PolicyOID> policy_oids_; | 75 std::set<PolicyOID> policy_oids_; |
76 #elif defined(OS_WIN) | 76 #elif defined(OS_WIN) |
77 typedef std::map<SHA1HashValue, std::string, | 77 typedef std::map<SHA1HashValue, std::string, SHA1HashValueLessThan> |
78 SHA1HashValueLessThan> ExtraEVCAMap; | 78 ExtraEVCAMap; |
79 | 79 |
80 // extra_cas_ contains any EV CA metadata that was added at runtime. | 80 // extra_cas_ contains any EV CA metadata that was added at runtime. |
81 ExtraEVCAMap extra_cas_; | 81 ExtraEVCAMap extra_cas_; |
82 #endif | 82 #endif |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); | 84 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace net | 87 } // namespace net |
88 | 88 |
89 #endif // NET_CERT_EV_ROOT_CA_METADATA_H_ | 89 #endif // NET_CERT_EV_ROOT_CA_METADATA_H_ |
OLD | NEW |