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

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

Issue 2781093003: De-prioritize 2.23.140.1.1 when searching for EV policy. (Closed)
Patch Set: Created 3 years, 8 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 | « net/cert/cert_verify_proc_win.cc ('k') | net/cert/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) 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_CERTS) 10 #if defined(USE_NSS_CERTS)
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 static EVRootCAMetadata* GetInstance(); 47 static EVRootCAMetadata* GetInstance();
48 48
49 #if defined(USE_NSS_CERTS) || defined(OS_WIN) || defined(OS_MACOSX) 49 #if defined(USE_NSS_CERTS) || defined(OS_WIN) || defined(OS_MACOSX)
50 // Returns true if policy_oid is an EV policy OID of some root CA. 50 // Returns true if policy_oid is an EV policy OID of some root CA.
51 bool IsEVPolicyOID(PolicyOID policy_oid) const; 51 bool IsEVPolicyOID(PolicyOID policy_oid) const;
52 52
53 // Returns true if the root CA with the given certificate fingerprint has 53 // Returns true if the root CA with the given certificate fingerprint has
54 // the EV policy OID policy_oid. 54 // the EV policy OID policy_oid.
55 bool HasEVPolicyOID(const SHA1HashValue& fingerprint, 55 bool HasEVPolicyOID(const SHA1HashValue& fingerprint,
56 PolicyOID policy_oid) const; 56 PolicyOID policy_oid) const;
57
58 // Returns true if |policy_oid| is for 2.23.140.1.1 (CA/Browser Forum's
59 // Extended Validation Policy).
60 // TODO(eroman): Remove this and instead test each candidate OID.
61 static bool IsCaBrowserForumEvOid(PolicyOID policy_oid);
57 #endif 62 #endif
58 63
59 // AddEVCA adds an EV CA to the list of known EV CAs with the given policy. 64 // AddEVCA adds an EV CA to the list of known EV CAs with the given policy.
60 // |policy| is expressed as a string of dotted numbers. It returns true on 65 // |policy| is expressed as a string of dotted numbers. It returns true on
61 // success. 66 // success.
62 bool AddEVCA(const SHA1HashValue& fingerprint, const char* policy); 67 bool AddEVCA(const SHA1HashValue& fingerprint, const char* policy);
63 68
64 // RemoveEVCA removes an EV CA that was previously added by AddEVCA. It 69 // RemoveEVCA removes an EV CA that was previously added by AddEVCA. It
65 // returns true on success. 70 // returns true on success.
66 bool RemoveEVCA(const SHA1HashValue& fingerprint); 71 bool RemoveEVCA(const SHA1HashValue& fingerprint);
(...skipping 28 matching lines...) Expand all
95 PolicyOIDMap ev_policy_; 100 PolicyOIDMap ev_policy_;
96 std::set<std::string> policy_oids_; 101 std::set<std::string> policy_oids_;
97 #endif 102 #endif
98 103
99 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata); 104 DISALLOW_COPY_AND_ASSIGN(EVRootCAMetadata);
100 }; 105 };
101 106
102 } // namespace net 107 } // namespace net
103 108
104 #endif // NET_CERT_EV_ROOT_CA_METADATA_H_ 109 #endif // NET_CERT_EV_ROOT_CA_METADATA_H_
OLDNEW
« no previous file with comments | « net/cert/cert_verify_proc_win.cc ('k') | net/cert/ev_root_ca_metadata.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698