Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Side by Side Diff: net/base/ev_root_ca_metadata.h

Issue 2815048: Minor clean-up tasks that were TODO(snej) (Closed)
Patch Set: Rebase on trunk prior to landing Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/ssl/ssl_policy_backend.cc ('k') | net/base/ev_root_ca_metadata.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(USE_NSS) 10 #if defined(USE_NSS)
(...skipping 17 matching lines...) Expand all
28 #if defined(USE_NSS) 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 SHA1Fingerprint& fingerprint,
39 PolicyOID* policy_oid) const; 39 PolicyOID* policy_oid) const;
40 40
41 const PolicyOID* GetPolicyOIDs() const { return &policy_oids_[0]; } 41 const PolicyOID* GetPolicyOIDs() const { return &policy_oids_[0]; }
42 int NumPolicyOIDs() const { return policy_oids_.size(); } 42 int NumPolicyOIDs() const { return policy_oids_.size(); }
43 43
44 private: 44 private:
45 EVRootCAMetadata(); 45 EVRootCAMetadata();
46 ~EVRootCAMetadata() { } 46 ~EVRootCAMetadata() { }
47 47
48 friend struct DefaultSingletonTraits<EVRootCAMetadata>; 48 friend struct DefaultSingletonTraits<EVRootCAMetadata>;
49 49
50 typedef std::map<X509Certificate::Fingerprint, PolicyOID, 50 typedef std::map<SHA1Fingerprint, PolicyOID,
51 X509Certificate::FingerprintLessThan> PolicyOidMap; 51 SHA1FingerprintLessThan> PolicyOidMap;
52 52
53 // Maps an EV root CA cert's SHA-1 fingerprint to its EV policy OID. 53 // Maps an EV root CA cert's SHA-1 fingerprint to its EV policy OID.
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_
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_policy_backend.cc ('k') | net/base/ev_root_ca_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698