Roll src/third_party/skia 89d5988:cb67414
[chromium-blink-merge.git] / net / cert / ev_root_ca_metadata.cc
blob8dd55f4e8c4e3a569d096b3ae8bace818a5d5264
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
3 // found in the LICENSE file.
5 #include "net/cert/ev_root_ca_metadata.h"
7 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
8 #include <cert.h>
9 #include <pkcs11n.h>
10 #include <secerr.h>
11 #include <secoid.h>
12 #elif defined(OS_WIN)
13 #include <stdlib.h>
14 #endif
16 #include "base/lazy_instance.h"
17 #include "base/logging.h"
18 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
19 #include "crypto/nss_util.h"
20 #endif
22 namespace net {
24 #if defined(USE_NSS_CERTS) || defined(OS_IOS) || defined(OS_WIN)
25 // Raw metadata.
26 struct EVMetadata {
27 // kMaxOIDsPerCA is the number of OIDs that we can support per root CA. At
28 // least one CA has different EV policies for businuss vs government
29 // entities and, in the case of cross-signing, we might need to list another
30 // CA's policy OID under the cross-signing root.
31 static const size_t kMaxOIDsPerCA = 2;
32 // This is the maximum length of an OID string (including the trailing NUL).
33 static const size_t kMaxOIDLength = 32;
35 // The SHA-1 fingerprint of the root CA certificate, used as a unique
36 // identifier for a root CA certificate.
37 SHA1HashValue fingerprint;
39 // The EV policy OIDs of the root CA.
40 const char policy_oids[kMaxOIDsPerCA][kMaxOIDLength];
43 static const EVMetadata ev_root_ca_metadata[] = {
44 // AC Camerfirma S.A. Chambers of Commerce Root - 2008
45 // https://www.camerfirma.com
46 { { { 0x78, 0x6a, 0x74, 0xac, 0x76, 0xab, 0x14, 0x7f, 0x9c, 0x6a,
47 0x30, 0x50, 0xba, 0x9e, 0xa8, 0x7e, 0xfe, 0x9a, 0xce, 0x3c } },
48 { // AC Camerfirma uses the last two arcs to track how the private key is
49 // managed - the effective verification policy is the same.
50 "1.3.6.1.4.1.17326.10.14.2.1.2",
51 "1.3.6.1.4.1.17326.10.14.2.2.2", },
53 // AC Camerfirma S.A. Global Chambersign Root - 2008
54 // https://server2.camerfirma.com:8082
55 { { { 0x4a, 0xbd, 0xee, 0xec, 0x95, 0x0d, 0x35, 0x9c, 0x89, 0xae,
56 0xc7, 0x52, 0xa1, 0x2c, 0x5b, 0x29, 0xf6, 0xd6, 0xaa, 0x0c } },
57 { // AC Camerfirma uses the last two arcs to track how the private key is
58 // managed - the effective verification policy is the same.
59 "1.3.6.1.4.1.17326.10.8.12.1.2",
60 "1.3.6.1.4.1.17326.10.8.12.2.2", },
62 // AddTrust External CA Root
63 // https://addtrustexternalcaroot-ev.comodoca.com
64 { { { 0x02, 0xfa, 0xf3, 0xe2, 0x91, 0x43, 0x54, 0x68, 0x60, 0x78,
65 0x57, 0x69, 0x4d, 0xf5, 0xe4, 0x5b, 0x68, 0x85, 0x18, 0x68 } },
67 "1.3.6.1.4.1.6449.1.2.1.5.1",
68 // This is the Network Solutions EV OID. However, this root
69 // cross-certifies NetSol and so we need it here too.
70 "1.3.6.1.4.1.782.1.2.1.8.1",
73 // Actalis Authentication Root CA
74 // https://ssltest-a.actalis.it:8443
75 { { { 0xf3, 0x73, 0xb3, 0x87, 0x06, 0x5a, 0x28, 0x84, 0x8a, 0xf2,
76 0xf3, 0x4a, 0xce, 0x19, 0x2b, 0xdd, 0xc7, 0x8e, 0x9c, 0xac } },
77 {"1.3.159.1.17.1", ""},
79 // AffirmTrust Commercial
80 // https://commercial.affirmtrust.com/
81 { { { 0xf9, 0xb5, 0xb6, 0x32, 0x45, 0x5f, 0x9c, 0xbe, 0xec, 0x57,
82 0x5f, 0x80, 0xdc, 0xe9, 0x6e, 0x2c, 0xc7, 0xb2, 0x78, 0xb7 } },
83 {"1.3.6.1.4.1.34697.2.1", ""},
85 // AffirmTrust Networking
86 // https://networking.affirmtrust.com:4431
87 { { { 0x29, 0x36, 0x21, 0x02, 0x8b, 0x20, 0xed, 0x02, 0xf5, 0x66,
88 0xc5, 0x32, 0xd1, 0xd6, 0xed, 0x90, 0x9f, 0x45, 0x00, 0x2f } },
89 {"1.3.6.1.4.1.34697.2.2", ""},
91 // AffirmTrust Premium
92 // https://premium.affirmtrust.com:4432/
93 { { { 0xd8, 0xa6, 0x33, 0x2c, 0xe0, 0x03, 0x6f, 0xb1, 0x85, 0xf6,
94 0x63, 0x4f, 0x7d, 0x6a, 0x06, 0x65, 0x26, 0x32, 0x28, 0x27 } },
95 {"1.3.6.1.4.1.34697.2.3", ""},
97 // AffirmTrust Premium ECC
98 // https://premiumecc.affirmtrust.com:4433/
99 { { { 0xb8, 0x23, 0x6b, 0x00, 0x2f, 0x1d, 0x16, 0x86, 0x53, 0x01,
100 0x55, 0x6c, 0x11, 0xa4, 0x37, 0xca, 0xeb, 0xff, 0xc3, 0xbb } },
101 {"1.3.6.1.4.1.34697.2.4", ""},
103 // Autoridad de Certificacion Firmaprofesional CIF A62634068
104 // https://publifirma.firmaprofesional.com/
105 { { { 0xae, 0xc5, 0xfb, 0x3f, 0xc8, 0xe1, 0xbf, 0xc4, 0xe5, 0x4f,
106 0x03, 0x07, 0x5a, 0x9a, 0xe8, 0x00, 0xb7, 0xf7, 0xb6, 0xfa } },
107 {"1.3.6.1.4.1.13177.10.1.3.10", "" }
109 // Baltimore CyberTrust Root
110 // https://secure.omniroot.com/repository/
111 { { { 0xd4, 0xde, 0x20, 0xd0, 0x5e, 0x66, 0xfc, 0x53, 0xfe, 0x1a,
112 0x50, 0x88, 0x2c, 0x78, 0xdb, 0x28, 0x52, 0xca, 0xe4, 0x74 } },
113 {"1.3.6.1.4.1.6334.1.100.1", ""},
115 // Buypass Class 3 CA 1
116 // https://valid.evident.ca13.ssl.buypass.no/
117 { { { 0x61, 0x57, 0x3A, 0x11, 0xDF, 0x0E, 0xD8, 0x7E, 0xD5, 0x92,
118 0x65, 0x22, 0xEA, 0xD0, 0x56, 0xD7, 0x44, 0xB3, 0x23, 0x71 } },
119 {"2.16.578.1.26.1.3.3", ""},
121 // Buypass Class 3 Root CA
122 // https://valid.evident.ca23.ssl.buypass.no/
123 { { { 0xDA, 0xFA, 0xF7, 0xFA, 0x66, 0x84, 0xEC, 0x06, 0x8F, 0x14,
124 0x50, 0xBD, 0xC7, 0xC2, 0x81, 0xA5, 0xBC, 0xA9, 0x64, 0x57 } },
125 {"2.16.578.1.26.1.3.3", ""},
127 // CA 沃通根证书
128 // https://root2evtest.wosign.com/
129 { { { 0x16, 0x32, 0x47, 0x8d, 0x89, 0xf9, 0x21, 0x3a, 0x92, 0x00,
130 0x85, 0x63, 0xf5, 0xa4, 0xa7, 0xd3, 0x12, 0x40, 0x8a, 0xd6 } },
131 {"1.3.6.1.4.1.36305.2", ""},
133 // Certification Authority of WoSign
134 // https://root1evtest.wosign.com/
135 { { { 0xb9, 0x42, 0x94, 0xbf, 0x91, 0xea, 0x8f, 0xb6, 0x4b, 0xe6,
136 0x10, 0x97, 0xc7, 0xfb, 0x00, 0x13, 0x59, 0xb6, 0x76, 0xcb } },
137 {"1.3.6.1.4.1.36305.2", ""},
139 // CertPlus Class 2 Primary CA (KEYNECTIS)
140 // https://www.keynectis.com/
141 { { { 0x74, 0x20, 0x74, 0x41, 0x72, 0x9c, 0xdd, 0x92, 0xec, 0x79,
142 0x31, 0xd8, 0x23, 0x10, 0x8d, 0xc2, 0x81, 0x92, 0xe2, 0xbb } },
143 {"1.3.6.1.4.1.22234.2.5.2.3.1", ""},
145 // Certum Trusted Network CA
146 // https://juice.certum.pl/
147 { { { 0x07, 0xe0, 0x32, 0xe0, 0x20, 0xb7, 0x2c, 0x3f, 0x19, 0x2f,
148 0x06, 0x28, 0xa2, 0x59, 0x3a, 0x19, 0xa7, 0x0f, 0x06, 0x9e } },
149 {"1.2.616.1.113527.2.5.1.1", ""},
151 // China Internet Network Information Center EV Certificates Root
152 // https://evdemo.cnnic.cn/
153 { { { 0x4F, 0x99, 0xAA, 0x93, 0xFB, 0x2B, 0xD1, 0x37, 0x26, 0xA1,
154 0x99, 0x4A, 0xCE, 0x7F, 0xF0, 0x05, 0xF2, 0x93, 0x5D, 0x1E } },
155 {"1.3.6.1.4.1.29836.1.10", ""},
157 // COMODO Certification Authority
158 // https://secure.comodo.com/
159 { { { 0x66, 0x31, 0xbf, 0x9e, 0xf7, 0x4f, 0x9e, 0xb6, 0xc9, 0xd5,
160 0xa6, 0x0c, 0xba, 0x6a, 0xbe, 0xd1, 0xf7, 0xbd, 0xef, 0x7b } },
161 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
163 // COMODO Certification Authority (reissued certificate with NotBefore of Jan
164 // 1 00:00:00 2011 GMT)
165 // https://secure.comodo.com/
166 { { { 0xee, 0x86, 0x93, 0x87, 0xff, 0xfd, 0x83, 0x49, 0xab, 0x5a,
167 0xd1, 0x43, 0x22, 0x58, 0x87, 0x89, 0xa4, 0x57, 0xb0, 0x12 } },
168 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
170 // COMODO ECC Certification Authority
171 // https://comodoecccertificationauthority-ev.comodoca.com/
172 { { { 0x9f, 0x74, 0x4e, 0x9f, 0x2b, 0x4d, 0xba, 0xec, 0x0f, 0x31,
173 0x2c, 0x50, 0xb6, 0x56, 0x3b, 0x8e, 0x2d, 0x93, 0xc3, 0x11 } },
174 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
176 // COMODO RSA Certification Authority
177 // https://comodorsacertificationauthority-ev.comodoca.com/
178 { { { 0xaf, 0xe5, 0xd2, 0x44, 0xa8, 0xd1, 0x19, 0x42, 0x30, 0xff,
179 0x47, 0x9f, 0xe2, 0xf8, 0x97, 0xbb, 0xcd, 0x7a, 0x8c, 0xb4 } },
180 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
182 // Cybertrust Global Root
183 // https://evup.cybertrust.ne.jp/ctj-ev-upgrader/evseal.gif
184 { { { 0x5f, 0x43, 0xe5, 0xb1, 0xbf, 0xf8, 0x78, 0x8c, 0xac, 0x1c,
185 0xc7, 0xca, 0x4a, 0x9a, 0xc6, 0x22, 0x2b, 0xcc, 0x34, 0xc6 } },
186 {"1.3.6.1.4.1.6334.1.100.1", ""},
188 // DigiCert High Assurance EV Root CA
189 // https://www.digicert.com
190 { { { 0x5f, 0xb7, 0xee, 0x06, 0x33, 0xe2, 0x59, 0xdb, 0xad, 0x0c,
191 0x4c, 0x9a, 0xe6, 0xd3, 0x8f, 0x1a, 0x61, 0xc7, 0xdc, 0x25 } },
192 {"2.16.840.1.114412.2.1", ""},
194 // D-TRUST Root Class 3 CA 2 EV 2009
195 // https://certdemo-ev-valid.ssl.d-trust.net/
196 { { { 0x96, 0xc9, 0x1b, 0x0b, 0x95, 0xb4, 0x10, 0x98, 0x42, 0xfa,
197 0xd0, 0xd8, 0x22, 0x79, 0xfe, 0x60, 0xfa, 0xb9, 0x16, 0x83 } },
198 {"1.3.6.1.4.1.4788.2.202.1", ""},
200 // Entrust.net Secure Server Certification Authority
201 // https://www.entrust.net/
202 { { { 0x99, 0xa6, 0x9b, 0xe6, 0x1a, 0xfe, 0x88, 0x6b, 0x4d, 0x2b,
203 0x82, 0x00, 0x7c, 0xb8, 0x54, 0xfc, 0x31, 0x7e, 0x15, 0x39 } },
204 {"2.16.840.1.114028.10.1.2", ""},
206 // Entrust Root Certification Authority
207 // https://www.entrust.net/
208 { { { 0xb3, 0x1e, 0xb1, 0xb7, 0x40, 0xe3, 0x6c, 0x84, 0x02, 0xda,
209 0xdc, 0x37, 0xd4, 0x4d, 0xf5, 0xd4, 0x67, 0x49, 0x52, 0xf9 } },
210 {"2.16.840.1.114028.10.1.2", ""},
212 // Equifax Secure Certificate Authority (GeoTrust)
213 // https://www.geotrust.com/
214 { { { 0xd2, 0x32, 0x09, 0xad, 0x23, 0xd3, 0x14, 0x23, 0x21, 0x74,
215 0xe4, 0x0d, 0x7f, 0x9d, 0x62, 0x13, 0x97, 0x86, 0x63, 0x3a } },
216 {"1.3.6.1.4.1.14370.1.6", ""},
218 // E-Tugra Certification Authority
219 // https://sslev.e-tugra.com.tr
220 { { { 0x51, 0xC6, 0xE7, 0x08, 0x49, 0x06, 0x6E, 0xF3, 0x92, 0xD4,
221 0x5C, 0xA0, 0x0D, 0x6D, 0xA3, 0x62, 0x8F, 0xC3, 0x52, 0x39 } },
222 {"2.16.792.3.0.4.1.1.4", ""},
224 // GeoTrust Primary Certification Authority
225 // https://www.geotrust.com/
226 { { { 0x32, 0x3c, 0x11, 0x8e, 0x1b, 0xf7, 0xb8, 0xb6, 0x52, 0x54,
227 0xe2, 0xe2, 0x10, 0x0d, 0xd6, 0x02, 0x90, 0x37, 0xf0, 0x96 } },
228 {"1.3.6.1.4.1.14370.1.6", ""},
230 // GeoTrust Primary Certification Authority - G2
231 { { { 0x8d, 0x17, 0x84, 0xd5, 0x37, 0xf3, 0x03, 0x7d, 0xec, 0x70,
232 0xfe, 0x57, 0x8b, 0x51, 0x9a, 0x99, 0xe6, 0x10, 0xd7, 0xb0 } },
233 {"1.3.6.1.4.1.14370.1.6", ""},
235 // GeoTrust Primary Certification Authority - G3
236 { { { 0x03, 0x9e, 0xed, 0xb8, 0x0b, 0xe7, 0xa0, 0x3c, 0x69, 0x53,
237 0x89, 0x3b, 0x20, 0xd2, 0xd9, 0x32, 0x3a, 0x4c, 0x2a, 0xfd } },
238 {"1.3.6.1.4.1.14370.1.6", ""},
240 // GlobalSign Root CA - R2
241 // https://www.globalsign.com/
242 { { { 0x75, 0xe0, 0xab, 0xb6, 0x13, 0x85, 0x12, 0x27, 0x1c, 0x04,
243 0xf8, 0x5f, 0xdd, 0xde, 0x38, 0xe4, 0xb7, 0x24, 0x2e, 0xfe } },
244 {"1.3.6.1.4.1.4146.1.1", ""},
246 // GlobalSign Root CA
247 { { { 0xb1, 0xbc, 0x96, 0x8b, 0xd4, 0xf4, 0x9d, 0x62, 0x2a, 0xa8,
248 0x9a, 0x81, 0xf2, 0x15, 0x01, 0x52, 0xa4, 0x1d, 0x82, 0x9c } },
249 {"1.3.6.1.4.1.4146.1.1", ""},
251 // GlobalSign Root CA - R3
252 // https://2029.globalsign.com/
253 { { { 0xd6, 0x9b, 0x56, 0x11, 0x48, 0xf0, 0x1c, 0x77, 0xc5, 0x45,
254 0x78, 0xc1, 0x09, 0x26, 0xdf, 0x5b, 0x85, 0x69, 0x76, 0xad } },
255 {"1.3.6.1.4.1.4146.1.1", ""},
257 // GlobalSign ECC Root CA - R4
258 // https://2038r4.globalsign.com
259 { { { 0x69, 0x69, 0x56, 0x2e, 0x40, 0x80, 0xf4, 0x24, 0xa1, 0xe7,
260 0x19, 0x9f, 0x14, 0xba, 0xf3, 0xee, 0x58, 0xab, 0x6a, 0xbb } },
261 {"1.3.6.1.4.1.4146.1.1", ""},
263 // GlobalSign ECC Root CA - R5
264 // https://2038r5.globalsign.com/
265 { { { 0x1f, 0x24, 0xc6, 0x30, 0xcd, 0xa4, 0x18, 0xef, 0x20, 0x69,
266 0xff, 0xad, 0x4f, 0xdd, 0x5f, 0x46, 0x3a, 0x1b, 0x69, 0xaa } },
267 {"1.3.6.1.4.1.4146.1.1", ""}
269 // Go Daddy Class 2 Certification Authority
270 // https://www.godaddy.com/
271 { { { 0x27, 0x96, 0xba, 0xe6, 0x3f, 0x18, 0x01, 0xe2, 0x77, 0x26,
272 0x1b, 0xa0, 0xd7, 0x77, 0x70, 0x02, 0x8f, 0x20, 0xee, 0xe4 } },
273 {"2.16.840.1.114413.1.7.23.3", ""},
275 // Go Daddy Root Certificate Authority - G2
276 // https://valid.gdig2.catest.godaddy.com/
277 { { { 0x47, 0xbe, 0xab, 0xc9, 0x22, 0xea, 0xe8, 0x0e, 0x78, 0x78,
278 0x34, 0x62, 0xa7, 0x9f, 0x45, 0xc2, 0x54, 0xfd, 0xe6, 0x8b } },
279 {"2.16.840.1.114413.1.7.23.3", ""},
281 // GTE CyberTrust Global Root
282 // https://www.cybertrust.ne.jp/
283 { { { 0x97, 0x81, 0x79, 0x50, 0xd8, 0x1c, 0x96, 0x70, 0xcc, 0x34,
284 0xd8, 0x09, 0xcf, 0x79, 0x44, 0x31, 0x36, 0x7e, 0xf4, 0x74 } },
285 {"1.3.6.1.4.1.6334.1.100.1", ""},
287 // Izenpe.com - SHA256 root
288 // The first OID is for businesses and the second for government entities.
289 // These are the test sites, respectively:
290 // https://servicios.izenpe.com
291 // https://servicios1.izenpe.com
292 { { { 0x2f, 0x78, 0x3d, 0x25, 0x52, 0x18, 0xa7, 0x4a, 0x65, 0x39,
293 0x71, 0xb5, 0x2c, 0xa2, 0x9c, 0x45, 0x15, 0x6f, 0xe9, 0x19} },
294 {"1.3.6.1.4.1.14777.6.1.1", "1.3.6.1.4.1.14777.6.1.2"},
296 // Izenpe.com - SHA1 root
297 // Windows XP finds this, SHA1, root instead. The policy OIDs are the same as
298 // for the SHA256 root, above.
299 { { { 0x30, 0x77, 0x9e, 0x93, 0x15, 0x02, 0x2e, 0x94, 0x85, 0x6a,
300 0x3f, 0xf8, 0xbc, 0xf8, 0x15, 0xb0, 0x82, 0xf9, 0xae, 0xfd} },
301 {"1.3.6.1.4.1.14777.6.1.1", "1.3.6.1.4.1.14777.6.1.2"},
303 // Network Solutions Certificate Authority
304 // https://www.networksolutions.com/website-packages/index.jsp
305 { { { 0x74, 0xf8, 0xa3, 0xc3, 0xef, 0xe7, 0xb3, 0x90, 0x06, 0x4b,
306 0x83, 0x90, 0x3c, 0x21, 0x64, 0x60, 0x20, 0xe5, 0xdf, 0xce } },
307 {"1.3.6.1.4.1.782.1.2.1.8.1", ""},
309 // Network Solutions Certificate Authority (reissued certificate with
310 // NotBefore of Jan 1 00:00:00 2011 GMT).
311 // https://www.networksolutions.com/website-packages/index.jsp
312 { { { 0x71, 0x89, 0x9a, 0x67, 0xbf, 0x33, 0xaf, 0x31, 0xbe, 0xfd,
313 0xc0, 0x71, 0xf8, 0xf7, 0x33, 0xb1, 0x83, 0x85, 0x63, 0x32 } },
314 {"1.3.6.1.4.1.782.1.2.1.8.1", ""},
316 // QuoVadis Root CA 2
317 // https://www.quovadis.bm/
318 { { { 0xca, 0x3a, 0xfb, 0xcf, 0x12, 0x40, 0x36, 0x4b, 0x44, 0xb2,
319 0x16, 0x20, 0x88, 0x80, 0x48, 0x39, 0x19, 0x93, 0x7c, 0xf7 } },
320 {"1.3.6.1.4.1.8024.0.2.100.1.2", ""},
322 // QuoVadis Root CA 2 G3
323 // https://evsslicag3-v.quovadisglobal.com/
324 { { { 0x09, 0x3c, 0x61, 0xf3, 0x8b, 0x8b, 0xdc, 0x7d, 0x55, 0xdf,
325 0x75, 0x38, 0x02, 0x05, 0x00, 0xe1, 0x25, 0xf5, 0xc8, 0x36 } },
326 {"1.3.6.1.4.1.8024.0.2.100.1.2", ""},
328 // SecureTrust CA, SecureTrust Corporation
329 // https://www.securetrust.com
330 // https://www.trustwave.com/
331 { { { 0x87, 0x82, 0xc6, 0xc3, 0x04, 0x35, 0x3b, 0xcf, 0xd2, 0x96,
332 0x92, 0xd2, 0x59, 0x3e, 0x7d, 0x44, 0xd9, 0x34, 0xff, 0x11 } },
333 {"2.16.840.1.114404.1.1.2.4.1", ""},
335 // Secure Global CA, SecureTrust Corporation
336 { { { 0x3a, 0x44, 0x73, 0x5a, 0xe5, 0x81, 0x90, 0x1f, 0x24, 0x86,
337 0x61, 0x46, 0x1e, 0x3b, 0x9c, 0xc4, 0x5f, 0xf5, 0x3a, 0x1b } },
338 {"2.16.840.1.114404.1.1.2.4.1", ""},
340 // Security Communication RootCA1
341 // https://www.secomtrust.net/contact/form.html
342 { { { 0x36, 0xb1, 0x2b, 0x49, 0xf9, 0x81, 0x9e, 0xd7, 0x4c, 0x9e,
343 0xbc, 0x38, 0x0f, 0xc6, 0x56, 0x8f, 0x5d, 0xac, 0xb2, 0xf7 } },
344 {"1.2.392.200091.100.721.1", ""},
346 // Security Communication EV RootCA1
347 // https://www.secomtrust.net/contact/form.html
348 { { { 0xfe, 0xb8, 0xc4, 0x32, 0xdc, 0xf9, 0x76, 0x9a, 0xce, 0xae,
349 0x3d, 0xd8, 0x90, 0x8f, 0xfd, 0x28, 0x86, 0x65, 0x64, 0x7d } },
350 {"1.2.392.200091.100.721.1", ""},
352 // Staat der Nederlanden EV Root CA
353 // https://pkioevssl-v.quovadisglobal.com/
354 { { { 0x76, 0xe2, 0x7e, 0xc1, 0x4f, 0xdb, 0x82, 0xc1, 0xc0, 0xa6,
355 0x75, 0xb5, 0x05, 0xbe, 0x3d, 0x29, 0xb4, 0xed, 0xdb, 0xbb } },
356 {"2.16.528.1.1003.1.2.7", ""},
358 // StartCom Certification Authority
359 // https://www.startssl.com/
360 { { { 0x3e, 0x2b, 0xf7, 0xf2, 0x03, 0x1b, 0x96, 0xf3, 0x8c, 0xe6,
361 0xc4, 0xd8, 0xa8, 0x5d, 0x3e, 0x2d, 0x58, 0x47, 0x6a, 0x0f } },
362 {"1.3.6.1.4.1.23223.1.1.1", ""},
364 // Starfield Class 2 Certification Authority
365 // https://www.starfieldtech.com/
366 { { { 0xad, 0x7e, 0x1c, 0x28, 0xb0, 0x64, 0xef, 0x8f, 0x60, 0x03,
367 0x40, 0x20, 0x14, 0xc3, 0xd0, 0xe3, 0x37, 0x0e, 0xb5, 0x8a } },
368 {"2.16.840.1.114414.1.7.23.3", ""},
370 // Starfield Root Certificate Authority - G2
371 // https://valid.sfig2.catest.starfieldtech.com/
372 { { { 0xb5, 0x1c, 0x06, 0x7c, 0xee, 0x2b, 0x0c, 0x3d, 0xf8, 0x55,
373 0xab, 0x2d, 0x92, 0xf4, 0xfe, 0x39, 0xd4, 0xe7, 0x0f, 0x0e } },
374 {"2.16.840.1.114414.1.7.23.3", ""},
376 // Starfield Services Root Certificate Authority - G2
377 // https://valid.sfsg2.catest.starfieldtech.com/
378 { { { 0x92, 0x5a, 0x8f, 0x8d, 0x2c, 0x6d, 0x04, 0xe0, 0x66, 0x5f,
379 0x59, 0x6a, 0xff, 0x22, 0xd8, 0x63, 0xe8, 0x25, 0x6f, 0x3f } },
380 {"2.16.840.1.114414.1.7.24.3", ""},
382 // SwissSign Gold CA - G2
383 // https://testevg2.swisssign.net/
384 { { { 0xd8, 0xc5, 0x38, 0x8a, 0xb7, 0x30, 0x1b, 0x1b, 0x6e, 0xd4,
385 0x7a, 0xe6, 0x45, 0x25, 0x3a, 0x6f, 0x9f, 0x1a, 0x27, 0x61 } },
386 {"2.16.756.1.89.1.2.1.1", ""},
388 // Swisscom Root EV CA 2
389 // https://test-quarz-ev-ca-2.pre.swissdigicert.ch
390 { { { 0xe7, 0xa1, 0x90, 0x29, 0xd3, 0xd5, 0x52, 0xdc, 0x0d, 0x0f,
391 0xc6, 0x92, 0xd3, 0xea, 0x88, 0x0d, 0x15, 0x2e, 0x1a, 0x6b } },
392 {"2.16.756.1.83.21.0", ""},
394 // Thawte Premium Server CA
395 // https://www.thawte.com/
396 { { { 0x62, 0x7f, 0x8d, 0x78, 0x27, 0x65, 0x63, 0x99, 0xd2, 0x7d,
397 0x7f, 0x90, 0x44, 0xc9, 0xfe, 0xb3, 0xf3, 0x3e, 0xfa, 0x9a } },
398 {"2.16.840.1.113733.1.7.48.1", ""},
400 // thawte Primary Root CA
401 // https://www.thawte.com/
402 { { { 0x91, 0xc6, 0xd6, 0xee, 0x3e, 0x8a, 0xc8, 0x63, 0x84, 0xe5,
403 0x48, 0xc2, 0x99, 0x29, 0x5c, 0x75, 0x6c, 0x81, 0x7b, 0x81 } },
404 {"2.16.840.1.113733.1.7.48.1", ""},
406 // thawte Primary Root CA - G2
407 { { { 0xaa, 0xdb, 0xbc, 0x22, 0x23, 0x8f, 0xc4, 0x01, 0xa1, 0x27,
408 0xbb, 0x38, 0xdd, 0xf4, 0x1d, 0xdb, 0x08, 0x9e, 0xf0, 0x12 } },
409 {"2.16.840.1.113733.1.7.48.1", ""},
411 // thawte Primary Root CA - G3
412 { { { 0xf1, 0x8b, 0x53, 0x8d, 0x1b, 0xe9, 0x03, 0xb6, 0xa6, 0xf0,
413 0x56, 0x43, 0x5b, 0x17, 0x15, 0x89, 0xca, 0xf3, 0x6b, 0xf2 } },
414 {"2.16.840.1.113733.1.7.48.1", ""},
416 // TWCA Global Root CA
417 // https://evssldemo3.twca.com.tw/index.html
418 { { { 0x9C, 0xBB, 0x48, 0x53, 0xF6, 0xA4, 0xF6, 0xD3, 0x52, 0xA4,
419 0xE8, 0x32, 0x52, 0x55, 0x60, 0x13, 0xF5, 0xAD, 0xAF, 0x65 } },
420 {"1.3.6.1.4.1.40869.1.1.22.3", ""},
422 // TWCA Root Certification Authority
423 // https://evssldemo.twca.com.tw/index.html
424 { { { 0xcf, 0x9e, 0x87, 0x6d, 0xd3, 0xeb, 0xfc, 0x42, 0x26, 0x97,
425 0xa3, 0xb5, 0xa3, 0x7a, 0xa0, 0x76, 0xa9, 0x06, 0x23, 0x48 } },
426 {"1.3.6.1.4.1.40869.1.1.22.3", ""},
428 // T-TeleSec GlobalRoot Class 3
429 // http://www.telesec.de/ / https://root-class3.test.telesec.de/
430 { { { 0x55, 0xa6, 0x72, 0x3e, 0xcb, 0xf2, 0xec, 0xcd, 0xc3, 0x23,
431 0x74, 0x70, 0x19, 0x9d, 0x2a, 0xbe, 0x11, 0xe3, 0x81, 0xd1 } },
432 {"1.3.6.1.4.1.7879.13.24.1", "" },
434 // USERTrust ECC Certification Authority
435 // https://usertrustecccertificationauthority-ev.comodoca.com/
436 { { { 0xd1, 0xcb, 0xca, 0x5d, 0xb2, 0xd5, 0x2a, 0x7f, 0x69, 0x3b,
437 0x67, 0x4d, 0xe5, 0xf0, 0x5a, 0x1d, 0x0c, 0x95, 0x7d, 0xf0 } },
438 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
440 // USERTrust RSA Certification Authority
441 // https://usertrustrsacertificationauthority-ev.comodoca.com/
442 { { { 0x2b, 0x8f, 0x1b, 0x57, 0x33, 0x0d, 0xbb, 0xa2, 0xd0, 0x7a,
443 0x6c, 0x51, 0xf7, 0x0e, 0xe9, 0x0d, 0xda, 0xb9, 0xad, 0x8e } },
444 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
446 // UTN - DATACorp SGC
447 { { { 0x58, 0x11, 0x9f, 0x0e, 0x12, 0x82, 0x87, 0xea, 0x50, 0xfd,
448 0xd9, 0x87, 0x45, 0x6f, 0x4f, 0x78, 0xdc, 0xfa, 0xd6, 0xd4 } },
449 {"1.3.6.1.4.1.6449.1.2.1.5.1", ""},
451 // UTN-USERFirst-Hardware
452 { { { 0x04, 0x83, 0xed, 0x33, 0x99, 0xac, 0x36, 0x08, 0x05, 0x87,
453 0x22, 0xed, 0xbc, 0x5e, 0x46, 0x00, 0xe3, 0xbe, 0xf9, 0xd7 } },
455 "1.3.6.1.4.1.6449.1.2.1.5.1",
456 // This is the Network Solutions EV OID. However, this root
457 // cross-certifies NetSol and so we need it here too.
458 "1.3.6.1.4.1.782.1.2.1.8.1",
461 // ValiCert Class 2 Policy Validation Authority
462 { { { 0x31, 0x7a, 0x2a, 0xd0, 0x7f, 0x2b, 0x33, 0x5e, 0xf5, 0xa1,
463 0xc3, 0x4e, 0x4b, 0x57, 0xe8, 0xb7, 0xd8, 0xf1, 0xfc, 0xa6 } },
464 {"2.16.840.1.114413.1.7.23.3", "2.16.840.1.114414.1.7.23.3"},
466 // VeriSign Class 3 Public Primary Certification Authority
467 // https://www.verisign.com/
468 { { { 0x74, 0x2c, 0x31, 0x92, 0xe6, 0x07, 0xe4, 0x24, 0xeb, 0x45,
469 0x49, 0x54, 0x2b, 0xe1, 0xbb, 0xc5, 0x3e, 0x61, 0x74, 0xe2 } },
470 {"2.16.840.1.113733.1.7.23.6", ""},
472 // VeriSign Class 3 Public Primary Certification Authority - G4
473 { { { 0x22, 0xD5, 0xD8, 0xDF, 0x8F, 0x02, 0x31, 0xD1, 0x8D, 0xF7,
474 0x9D, 0xB7, 0xCF, 0x8A, 0x2D, 0x64, 0xC9, 0x3F, 0x6C, 0x3A } },
475 {"2.16.840.1.113733.1.7.23.6", ""},
477 // VeriSign Class 3 Public Primary Certification Authority - G5
478 // https://www.verisign.com/
479 { { { 0x4e, 0xb6, 0xd5, 0x78, 0x49, 0x9b, 0x1c, 0xcf, 0x5f, 0x58,
480 0x1e, 0xad, 0x56, 0xbe, 0x3d, 0x9b, 0x67, 0x44, 0xa5, 0xe5 } },
481 {"2.16.840.1.113733.1.7.23.6", ""},
483 // VeriSign Universal Root Certification Authority
484 { { { 0x36, 0x79, 0xca, 0x35, 0x66, 0x87, 0x72, 0x30, 0x4d, 0x30,
485 0xa5, 0xfb, 0x87, 0x3b, 0x0f, 0xa7, 0x7b, 0xb7, 0x0d, 0x54 } },
486 {"2.16.840.1.113733.1.7.23.6", ""},
488 // Wells Fargo WellsSecure Public Root Certificate Authority
489 // https://nerys.wellsfargo.com/test.html
490 { { { 0xe7, 0xb4, 0xf6, 0x9d, 0x61, 0xec, 0x90, 0x69, 0xdb, 0x7e,
491 0x90, 0xa7, 0x40, 0x1a, 0x3c, 0xf4, 0x7d, 0x4f, 0xe8, 0xee } },
492 {"2.16.840.1.114171.500.9", ""},
494 // XRamp Global Certification Authority
495 { { { 0xb8, 0x01, 0x86, 0xd1, 0xeb, 0x9c, 0x86, 0xa5, 0x41, 0x04,
496 0xcf, 0x30, 0x54, 0xf3, 0x4c, 0x52, 0xb7, 0xe5, 0x58, 0xc6 } },
497 {"2.16.840.1.114404.1.1.2.4.1", ""},
501 #endif // defined(USE_NSS_CERTS) || defined(OS_IOS) || defined(OS_WIN)
503 static base::LazyInstance<EVRootCAMetadata>::Leaky
504 g_ev_root_ca_metadata = LAZY_INSTANCE_INITIALIZER;
506 // static
507 EVRootCAMetadata* EVRootCAMetadata::GetInstance() {
508 return g_ev_root_ca_metadata.Pointer();
511 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
512 bool EVRootCAMetadata::IsEVPolicyOID(PolicyOID policy_oid) const {
513 return policy_oids_.find(policy_oid) != policy_oids_.end();
516 bool EVRootCAMetadata::HasEVPolicyOID(
517 const SHA1HashValue& fingerprint,
518 PolicyOID policy_oid) const {
519 PolicyOIDMap::const_iterator iter = ev_policy_.find(fingerprint);
520 if (iter == ev_policy_.end())
521 return false;
522 for (std::vector<PolicyOID>::const_iterator
523 j = iter->second.begin(); j != iter->second.end(); ++j) {
524 if (*j == policy_oid)
525 return true;
527 return false;
530 bool EVRootCAMetadata::AddEVCA(const SHA1HashValue& fingerprint,
531 const char* policy) {
532 if (ev_policy_.find(fingerprint) != ev_policy_.end())
533 return false;
535 PolicyOID oid;
536 if (!RegisterOID(policy, &oid))
537 return false;
539 ev_policy_[fingerprint].push_back(oid);
540 policy_oids_.insert(oid);
542 return true;
545 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) {
546 PolicyOIDMap::iterator it = ev_policy_.find(fingerprint);
547 if (it == ev_policy_.end())
548 return false;
549 PolicyOID oid = it->second[0];
550 ev_policy_.erase(it);
551 policy_oids_.erase(oid);
552 return true;
555 // static
556 bool EVRootCAMetadata::RegisterOID(const char* policy,
557 PolicyOID* out) {
558 PRUint8 buf[64];
559 SECItem oid_item;
560 oid_item.data = buf;
561 oid_item.len = sizeof(buf);
562 SECStatus status = SEC_StringToOID(NULL, &oid_item, policy, 0);
563 if (status != SECSuccess)
564 return false;
566 // Register the OID.
567 SECOidData od;
568 od.oid.len = oid_item.len;
569 od.oid.data = oid_item.data;
570 od.offset = SEC_OID_UNKNOWN;
571 od.desc = policy;
572 od.mechanism = CKM_INVALID_MECHANISM;
573 od.supportedExtension = INVALID_CERT_EXTENSION;
574 *out = SECOID_AddEntry(&od);
575 return *out != SEC_OID_UNKNOWN;
578 #elif defined(OS_WIN)
580 bool EVRootCAMetadata::IsEVPolicyOID(PolicyOID policy_oid) const {
581 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
582 for (size_t j = 0; j < arraysize(ev_root_ca_metadata[i].policy_oids); j++) {
583 if (ev_root_ca_metadata[i].policy_oids[j][0] == '\0')
584 break;
585 if (strcmp(policy_oid, ev_root_ca_metadata[i].policy_oids[j]) == 0)
586 return true;
590 for (ExtraEVCAMap::const_iterator i = extra_cas_.begin();
591 i != extra_cas_.end(); i++) {
592 if (i->second == policy_oid)
593 return true;
596 return false;
599 bool EVRootCAMetadata::HasEVPolicyOID(const SHA1HashValue& fingerprint,
600 PolicyOID policy_oid) const {
601 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
602 if (!fingerprint.Equals(ev_root_ca_metadata[i].fingerprint))
603 continue;
604 for (size_t j = 0; j < arraysize(ev_root_ca_metadata[i].policy_oids); j++) {
605 if (ev_root_ca_metadata[i].policy_oids[j][0] == '\0')
606 break;
607 if (strcmp(policy_oid, ev_root_ca_metadata[i].policy_oids[j]) == 0)
608 return true;
610 return false;
613 ExtraEVCAMap::const_iterator it = extra_cas_.find(fingerprint);
614 return it != extra_cas_.end() && it->second == policy_oid;
617 bool EVRootCAMetadata::AddEVCA(const SHA1HashValue& fingerprint,
618 const char* policy) {
619 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
620 if (fingerprint.Equals(ev_root_ca_metadata[i].fingerprint))
621 return false;
624 if (extra_cas_.find(fingerprint) != extra_cas_.end())
625 return false;
627 extra_cas_[fingerprint] = policy;
628 return true;
631 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) {
632 ExtraEVCAMap::iterator it = extra_cas_.find(fingerprint);
633 if (it == extra_cas_.end())
634 return false;
635 extra_cas_.erase(it);
636 return true;
639 #else
641 // These are just stub functions for platforms where we don't use this EV
642 // metadata.
644 bool EVRootCAMetadata::AddEVCA(const SHA1HashValue& fingerprint,
645 const char* policy) {
646 return true;
649 bool EVRootCAMetadata::RemoveEVCA(const SHA1HashValue& fingerprint) {
650 return true;
653 #endif
655 EVRootCAMetadata::EVRootCAMetadata() {
656 // Constructs the object from the raw metadata in ev_root_ca_metadata.
657 #if defined(USE_NSS_CERTS) || defined(OS_IOS)
658 crypto::EnsureNSSInit();
660 for (size_t i = 0; i < arraysize(ev_root_ca_metadata); i++) {
661 const EVMetadata& metadata = ev_root_ca_metadata[i];
662 for (size_t j = 0; j < arraysize(metadata.policy_oids); j++) {
663 if (metadata.policy_oids[j][0] == '\0')
664 break;
665 const char* policy_oid = metadata.policy_oids[j];
667 PolicyOID policy;
668 if (!RegisterOID(policy_oid, &policy)) {
669 LOG(ERROR) << "Failed to register OID: " << policy_oid;
670 continue;
673 ev_policy_[metadata.fingerprint].push_back(policy);
674 policy_oids_.insert(policy);
677 #endif
680 EVRootCAMetadata::~EVRootCAMetadata() { }
682 } // namespace net