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 | 7 |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 | 9 |
10 #if defined(OS_LINUX) | 10 #if defined(USE_NSS) |
11 #include <secoidt.h> | 11 #include <secoidt.h> |
12 #endif | 12 #endif |
13 | 13 |
14 #include <map> | 14 #include <map> |
15 #include <vector> | 15 #include <vector> |
16 | 16 |
17 #include "net/base/x509_certificate.h" | 17 #include "net/base/x509_certificate.h" |
18 | 18 |
19 template <typename T> | 19 template <typename T> |
20 struct DefaultSingletonTraits; | 20 struct DefaultSingletonTraits; |
21 | 21 |
22 namespace net { | 22 namespace net { |
23 | 23 |
24 // A singleton. This class stores the meta data of the root CAs that issue | 24 // A singleton. This class stores the meta data of the root CAs that issue |
25 // extended-validation (EV) certificates. | 25 // extended-validation (EV) certificates. |
26 class EVRootCAMetadata { | 26 class EVRootCAMetadata { |
27 public: | 27 public: |
28 #if defined(OS_LINUX) | 28 #if defined(USE_NSS) |
29 typedef SECOidTag PolicyOID; | 29 typedef SECOidTag PolicyOID; |
30 #else | 30 #else |
31 typedef const char* PolicyOID; | 31 typedef const char* PolicyOID; |
32 #endif | 32 #endif |
33 | 33 |
34 static EVRootCAMetadata* GetInstance(); | 34 static EVRootCAMetadata* GetInstance(); |
35 | 35 |
36 // If the root CA cert has an EV policy OID, returns true and stores the | 36 // If the root CA cert has an EV policy OID, returns true and stores the |
37 // policy OID in *policy_oid. Otherwise, returns false. | 37 // policy OID in *policy_oid. Otherwise, returns false. |
38 bool GetPolicyOID(const X509Certificate::Fingerprint& fingerprint, | 38 bool GetPolicyOID(const X509Certificate::Fingerprint& fingerprint, |
(...skipping 15 matching lines...) Expand all Loading... |
54 PolicyOidMap ev_policy_; | 54 PolicyOidMap ev_policy_; |
55 | 55 |
56 std::vector<PolicyOID> policy_oids_; | 56 std::vector<PolicyOID> policy_oids_; |
57 | 57 |
58 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); | 58 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); |
59 }; | 59 }; |
60 | 60 |
61 } // namespace net | 61 } // namespace net |
62 | 62 |
63 #endif // NET_BASE_EV_ROOT_CA_METADATA_H_ | 63 #endif // NET_BASE_EV_ROOT_CA_METADATA_H_ |
OLD | NEW |