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

Unified Diff: net/cert/ev_root_ca_metadata.cc

Issue 2772283004: De-prioritize 2.23.140.1.1 when searching for EV policy. (Closed)
Patch Set: fix win compile Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/ev_root_ca_metadata.h ('k') | net/cert/ev_root_ca_metadata_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/ev_root_ca_metadata.cc
diff --git a/net/cert/ev_root_ca_metadata.cc b/net/cert/ev_root_ca_metadata.cc
index c513f66a64d7eb7fc45019ab1ec1a4aba430d8ef..f3c2dbaca5cf1e489c69a5e4c37711295021fcd6 100644
--- a/net/cert/ev_root_ca_metadata.cc
+++ b/net/cert/ev_root_ca_metadata.cc
@@ -666,6 +666,16 @@ bool EVRootCAMetadata::HasEVPolicyOID(
return false;
}
+// static
+bool EVRootCAMetadata::IsCaBrowserForumEvOid(PolicyOID policy_oid) {
+ // OID: 2.23.140.1.1
+ const uint8_t kCabEvOid[] = {0x67, 0x81, 0x0c, 0x01, 0x01};
+ SECItem item;
+ item.data = const_cast<uint8_t*>(&kCabEvOid[0]);
+ item.len = sizeof(kCabEvOid);
+ return policy_oid == SECOID_FindOIDTag(&item);
+}
+
bool EVRootCAMetadata::AddEVCA(const SHA1HashValue& fingerprint,
const char* policy) {
if (ev_policy_.find(fingerprint) != ev_policy_.end())
@@ -753,6 +763,11 @@ bool EVRootCAMetadata::HasEVPolicyOID(const SHA1HashValue& fingerprint,
return it != extra_cas_.end() && it->second == policy_oid;
}
+// static
+bool EVRootCAMetadata::IsCaBrowserForumEvOid(PolicyOID policy_oid) {
+ return strcmp(policy_oid, "2.23.140.1.1") == 0;
+}
+
bool EVRootCAMetadata::AddEVCA(const SHA1HashValue& fingerprint,
const char* policy) {
for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
@@ -806,6 +821,12 @@ bool EVRootCAMetadata::HasEVPolicyOID(const SHA1HashValue& fingerprint,
return false;
}
+// static
+bool EVRootCAMetadata::IsCaBrowserForumEvOid(PolicyOID policy_oid) {
+ const uint8_t kCabEvOid[] = {0x67, 0x81, 0x0c, 0x01, 0x01};
+ return der::Input(kCabEvOid) == policy_oid;
+}
+
bool EVRootCAMetadata::AddEVCA(const SHA1HashValue& fingerprint,
const char* policy) {
if (ev_policy_.find(fingerprint) != ev_policy_.end())
« no previous file with comments | « net/cert/ev_root_ca_metadata.h ('k') | net/cert/ev_root_ca_metadata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698