| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BASE_EV_ROOT_CA_METADATA_H_ | 5 #ifndef NET_BASE_EV_ROOT_CA_METADATA_H_ |
| 6 #define NET_BASE_EV_ROOT_CA_METADATA_H_ | 6 #define NET_BASE_EV_ROOT_CA_METADATA_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 // If the root CA cert has an EV policy OID, returns true and stores the | 37 // If the root CA cert has an EV policy OID, returns true and stores the |
| 38 // policy OID in *policy_oid. Otherwise, returns false. | 38 // policy OID in *policy_oid. Otherwise, returns false. |
| 39 bool GetPolicyOID(const SHA1Fingerprint& fingerprint, | 39 bool GetPolicyOID(const SHA1Fingerprint& fingerprint, |
| 40 PolicyOID* policy_oid) const; | 40 PolicyOID* policy_oid) const; |
| 41 | 41 |
| 42 const PolicyOID* GetPolicyOIDs() const { return &policy_oids_[0]; } | 42 const PolicyOID* GetPolicyOIDs() const { return &policy_oids_[0]; } |
| 43 int NumPolicyOIDs() const { return policy_oids_.size(); } | 43 int NumPolicyOIDs() const { return policy_oids_.size(); } |
| 44 | 44 |
| 45 private: | 45 private: |
| 46 EVRootCAMetadata(); | 46 EVRootCAMetadata(); |
| 47 ~EVRootCAMetadata() { } | 47 ~EVRootCAMetadata(); |
| 48 | 48 |
| 49 friend struct DefaultSingletonTraits<EVRootCAMetadata>; | 49 friend struct DefaultSingletonTraits<EVRootCAMetadata>; |
| 50 | 50 |
| 51 typedef std::map<SHA1Fingerprint, PolicyOID, | 51 typedef std::map<SHA1Fingerprint, PolicyOID, |
| 52 SHA1FingerprintLessThan> PolicyOidMap; | 52 SHA1FingerprintLessThan> PolicyOidMap; |
| 53 | 53 |
| 54 // Maps an EV root CA cert's SHA-1 fingerprint to its EV policy OID. | 54 // Maps an EV root CA cert's SHA-1 fingerprint to its EV policy OID. |
| 55 PolicyOidMap ev_policy_; | 55 PolicyOidMap ev_policy_; |
| 56 | 56 |
| 57 std::vector<PolicyOID> policy_oids_; | 57 std::vector<PolicyOID> policy_oids_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); | 59 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace net | 62 } // namespace net |
| 63 | 63 |
| 64 #endif // NET_BASE_EV_ROOT_CA_METADATA_H_ | 64 #endif // NET_BASE_EV_ROOT_CA_METADATA_H_ |
| OLD | NEW |