| 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 #include "base/singleton.h" | 5 #include "base/singleton.h" |
| 6 #include "net/base/ev_root_ca_metadata.h" | 6 #include "net/base/ev_root_ca_metadata.h" |
| 7 | 7 |
| 8 namespace net { | 8 namespace net { |
| 9 | 9 |
| 10 // Raw metadata. | 10 // Raw metadata. |
| 11 struct EVMetadata { | 11 struct EVMetadata { |
| 12 // The SHA-1 fingerprint of the root CA certificate, used as a unique | 12 // The SHA-1 fingerprint of the root CA certificate, used as a unique |
| 13 // identifier for a root CA certificate. | 13 // identifier for a root CA certificate. |
| 14 X509Certificate::Fingerprint fingerprint; | 14 X509Certificate::Fingerprint fingerprint; |
| 15 | 15 |
| 16 // The EV policy OID of the root CA. | 16 // The EV policy OID of the root CA. |
| 17 // Note: a root CA may have multiple EV policies. When that actually | 17 // Note: a root CA may have multiple EV policies. When that actually |
| 18 // happens, we'll need to support that. | 18 // happens, we'll need to support that. |
| 19 const char* policy_oid; | 19 const char* policy_oid; |
| 20 }; | 20 }; |
| 21 | 21 |
| 22 static const EVMetadata ev_root_ca_metadata[] = { | 22 static const EVMetadata ev_root_ca_metadata[] = { |
| 23 // AddTrust External CA Root |
| 24 // https://addtrustexternalcaroot-ev.comodoca.com |
| 25 { { { 0x02, 0xfa, 0xf3, 0xe2, 0x91, 0x43, 0x54, 0x68, 0x60, 0x78, |
| 26 0x57, 0x69, 0x4d, 0xf5, 0xe4, 0x5b, 0x68, 0x85, 0x18, 0x68 } }, |
| 27 "1.3.6.1.4.1.6449.1.2.1.5.1" |
| 28 }, |
| 23 // COMODO Certification Authority | 29 // COMODO Certification Authority |
| 24 // https://secure.comodo.com/ | 30 // https://secure.comodo.com/ |
| 25 { { { 0x66, 0x31, 0xbf, 0x9e, 0xf7, 0x4f, 0x9e, 0xb6, 0xc9, 0xd5, | 31 { { { 0x66, 0x31, 0xbf, 0x9e, 0xf7, 0x4f, 0x9e, 0xb6, 0xc9, 0xd5, |
| 26 0xa6, 0x0c, 0xba, 0x6a, 0xbe, 0xd1, 0xf7, 0xbd, 0xef, 0x7b } }, | 32 0xa6, 0x0c, 0xba, 0x6a, 0xbe, 0xd1, 0xf7, 0xbd, 0xef, 0x7b } }, |
| 27 "1.3.6.1.4.1.6449.1.2.1.5.1" | 33 "1.3.6.1.4.1.6449.1.2.1.5.1" |
| 28 }, | 34 }, |
| 29 // Cybertrust Global Root | 35 // Cybertrust Global Root |
| 30 // https://evup.cybertrust.ne.jp/ctj-ev-upgrader/evseal.gif | 36 // https://evup.cybertrust.ne.jp/ctj-ev-upgrader/evseal.gif |
| 31 { { { 0x5f, 0x43, 0xe5, 0xb1, 0xbf, 0xf8, 0x78, 0x8c, 0xac, 0x1c, | 37 { { { 0x5f, 0x43, 0xe5, 0xb1, 0xbf, 0xf8, 0x78, 0x8c, 0xac, 0x1c, |
| 32 0xc7, 0xca, 0x4a, 0x9a, 0xc6, 0x22, 0x2b, 0xcc, 0x34, 0xc6 } }, | 38 0xc7, 0xca, 0x4a, 0x9a, 0xc6, 0x22, 0x2b, 0xcc, 0x34, 0xc6 } }, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 ev_policy_[metadata.fingerprint] = metadata.policy_oid; | 193 ev_policy_[metadata.fingerprint] = metadata.policy_oid; |
| 188 // Multiple root CA certs may use the same EV policy OID. Having | 194 // Multiple root CA certs may use the same EV policy OID. Having |
| 189 // duplicates in the policy_oids_ array does no harm, so we don't | 195 // duplicates in the policy_oids_ array does no harm, so we don't |
| 190 // bother detecting duplicates. | 196 // bother detecting duplicates. |
| 191 policy_oids_[i] = metadata.policy_oid; | 197 policy_oids_[i] = metadata.policy_oid; |
| 192 } | 198 } |
| 193 } | 199 } |
| 194 | 200 |
| 195 } // namespace net | 201 } // namespace net |
| 196 | 202 |
| OLD | NEW |