xref: /aosp_15_r20/external/cronet/net/data/ssl/certificates/README (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1This directory contains various certificates for use with SSL-related
2unit tests.
3
4===== Real-world certificates that need manual updating
5- google.binary.p7b
6- google.chain.pem
7- google.pem_cert.p7b
8- google.pem_pkcs7.p7b
9- google.pkcs7.p7b
10- google.single.der
11- google.single.pem : Certificates for testing parsing of different formats.
12
13- mit.davidben.der : An expired MIT client certificate.
14
15- foaf.me.chromium-test-cert.der : A client certificate for a FOAF.ME identity
16     created for testing.
17
18- google_diginotar.pem
19- diginotar_public_ca_2025.pem : A certificate chain for the regression test
20      of http://crbug.com/94673
21
22- salesforce_com_test.pem
23- verisign_intermediate_ca_2011.pem
24- verisign_intermediate_ca_2016.pem : Certificates for testing two
25     X509Certificate objects that contain the same server certificate but
26     different intermediate CA certificates.  The two intermediate CA
27     certificates actually represent the same intermediate CA but have
28     different validity periods.
29
30- ndn.ca.crt: "New Dream Network Certificate Authority" root certificate.
31     This is an X.509 v1 certificate that omits the version field. Used to
32     test that the certificate version gets the default value v1.
33
34- ct-test-embedded-cert.pem
35- ct-test-embedded-with-intermediate-chain.pem
36- ct-test-embedded-with-intermediate-preca-chain.pem
37- ct-test-embedded-with-preca-chain.pem
38     Test certificate chains for Certificate Transparency: Each of these
39     files contains a leaf certificate as the first certificate, which has
40     embedded SCTs, followed by the issuer certificates chain.
41     All files are from the src/test/testdada directory in
42     https://code.google.com/p/certificate-transparency/
43
44- leaf_from_known_root.pem : A certificate issued by a public trust anchor,
45     used for CertVerifyProcInternalTest.TestKnownRoot. Using for other
46     purposes is not recommended. This needs to be updated periodically so the
47     server name the cert is valid for may change.
48
49- lets-encrypt-dst-x3-root.pem: A chain that ends in the Lets encrypt DST X3
50  root (https://crt.sh/?id=8395). Has the same leaf as
51  lets-encrypt-isrg-x1-root.pem.
52- lets-encrypt-isrg-x1-root.pem: A chain that ends in the Lets encrypt ISRG X1
53  root (https://crt.sh/?id=9314791). Has the same leaf as
54  lets-encrypt-dst-x3-root.pem.
55
56===== Manually generated certificates
57- client.p12 : A PKCS #12 file containing a client certificate and a private
58     RSA key created for testing.  The password is "12345".
59
60- client-nokey.p12 : A PKCS #12 file containing a client certificate (the same
61     as the one in client.p12) but no private key. The password is "12345".
62
63- client-empty-password.p12 : A PKCS #12 file containing an unencrypted client
64     certificate and a encrypted private key.  The password is the empty string,
65     encoded as two zero bytes.  (PKCS#12 passwords are encoded as
66     NUL-terminated UTF-16.)
67
68- client-null-password.p12 : A PKCS #12 file containing an unencrypted client
69     certificate and a encrypted private key.  The password is the empty string,
70     encoded as the empty byte string.
71
72- client_with_ec_key.p12 : A PKCS #12 file containing a client certificate and
73     a private EC key created for testing.  The password is "12345".
74
75- unittest.selfsigned.der : A self-signed certificate generated using private
76     key in unittest.key.bin. The common name is "unittest".
77
78- unittest.key.bin : private key stored unencrypted.
79
80- multivalue_rdn.pem : A regression test for http://crbug.com/101009. A
81     certificate with all of the AttributeTypeAndValues stored within a single
82     RelativeDistinguishedName, rather than one AVA per RDN as normally seen.
83
84- unescaped.pem : Regression test for http://crbug.com/102839. Contains
85     characters such as '=' and '"' that would normally be escaped when
86     converting a subject/issuer name to their stringized form.
87
88- websocket_cacert.pem : The testing root CA for testing WebSocket client
89     certificate authentication.
90     This file is used in SSLUITest.TestWSSClientCert.
91
92- websocket_client_cert.p12 : A PKCS #12 file containing a client certificate
93     and a private key created for WebSocket testing. The password is "".
94     This file is used in SSLUITest.TestWSSClientCert.
95
96- no_subject_common_name_cert.pem: Used to test the function that generates a
97  NSS certificate nickname for a user certificate. This certificate's Subject
98  field doesn't have a common name.
99
100- ct-test-embedded-with-uids.pem: A certificate with embedded SCT and
101  issuer/subject unique IDs. This certificate should only be used in parsing
102  tests and otherwise kept fixed. The signature, etc., are intentionally
103  invalid.
104
105- name_constrained_key.pem
106  The private key matching the public_key_hash of the kDomainsTest constraint
107  in CertVerifyProc::HasNameConstraintsViolation.
108
109===== From net/data/ssl/scripts/generate-quic-chain.sh
110- quic-chain.pem
111- quic-leaf-cert.key
112- quic-leaf-cert.key.pkcs8.pem
113- quic-root.pem
114     These certificates are used by integration tests that use QUIC.
115
116- quic-leaf-cert.key.sct
117     This isn't generated and just contains a simple text file (the contents
118     don't actually matter, just the presence of the file).
119
120===== From net/data/ssl/scripts/generate-test-certs.sh
121- expired_cert.pem
122- ok_cert.pem
123- root_ca_cert.pem
124    These certificates are the common certificates used by the Python test
125    server for simulating HTTPS connections.
126
127- intermediate_ca_cert.pem
128- ok_cert_by_intermediate.pem
129    These certificates simulate a more common chain of root (root_ca_cert.pem)
130    to intermediate (intermediate_ca_cert.pem) to leaf
131    (ok_cert_by_intermediate.pem).
132
133- wildcard_.pem
134    A certificate and private key valid for *.example.org, used in various
135    net unit tests.
136
137- test_names.pem
138    A certificate and private key valid for a number of test names. See
139    [test_names] in ee.cnf. Other names may be added as needed.
140
141- bad_validity.pem
142    A certificate and private key only valid on 0001-01-01. Windows refuses to
143    parse this certificate.
144
145- spdy_pooling.pem : Used to test the handling of spdy IP connection pooling
146
147- subjectAltName_sanity_check.pem : Used to test the handling of various types
148     within the subjectAltName extension of a certificate.
149
150- policies_sanity_check.pem : Used to test the parsing of various types of
151     certificatePolicies extension policyQualifiers.
152
153- punycodetest.pem : A test self-signed server certificate with punycode name.
154     The common name is "xn--wgv71a119e.com" (日本語.com)
155
156- sha1_2016.pem
157    Used to test the handling of SHA1 certificates expiring in 2016.
158
159- 10_year_validity.pem
160- 11_year_validity.pem
161- 39_months_after_2015_04.pem
162- 40_months_after_2015_04.pem
163- 60_months_after_2012_07.pem
164- 61_months_after_2012_07.pem
165- pre_br_validity_bad_121.pem
166- pre_br_validity_bad_2020.pem
167- pre_br_validity_ok.pem
168- start_after_expiry.pem
169    Certs to test that the maximum validity durations set by the CA/Browser
170    Forum Baseline Requirements are enforced.
171
172- may_2018.pem
173   An 825-day certificate issued on May 1, 2018, the official start of
174   enforcement requiring Certificate Transparency for new certificates. This
175   certificate does not have any embedded SCTs.
176
177- x509_verify_results.chain.pem : A simple certificate chain used to test that
178    the correctly ordered, filtered certificate chain is returned during
179    verification, regardless of the order in which the intermediate/root CA
180    certificates are provided.
181
182- ev_test.pem
183- ev_test_state_only.pem
184     Certificates for testing EV display (including regression test for
185     https://crbug.com/1069113).
186
187===== From net/data/ssl/scripts/generate-test-keys.sh
188- rsa-{768,1024,2048}-{1..3}.key
189- ec-prime256v1-{1..3}.key
190     Pre-generated keys of various types/sizes.
191     Useful for tests that generate RSA certificates with CertBuilder without
192     having to pay the cost of generating RSA keys at runtime. Multiple keys
193     of each size are provided. (EC keys are cheap to generate at runtime, but
194     having some as files simplifies test logic in cases where the test is
195     reading both RSA and EC keys from files.)
196
197===== From net/data/ssl/scripts/generate-redundant-test-chains.sh
198- redundant-validated-chain.pem
199- redundant-server-chain.pem
200- redundant-validated-chain-root.pem
201
202     Two chains, A -> B -> C -> D and A -> B -> C2 (C and C2 share the same
203     public key) to test that SSLInfo gets the reconstructed, re-ordered
204     chain instead of the chain as served. See
205     SSLClientSocketTest.VerifyReturnChainProperlyOrdered in
206     net/socket/ssl_client_socket_unittest.cc. These chains are valid until
207     26 Feb 2022 and are generated by
208     net/data/ssl/scripts/generate-redundant-test-chains.sh.
209
210===== From net/data/ssl/scripts/generate-client-certificates.sh
211- client_1.pem
212- client_1.key
213- client_1.pk8
214- client_1_ca.pem
215- client_2.pem
216- client_2.key
217- client_2.pk8
218- client_2_ca.pem
219- client_3.pem
220- client_3.key
221- client_3.pk8
222- client_3_ca.pem
223- client_4.pem
224- client_4.key
225- client_4.pk8
226- client_4_ca.pem
227- client_5.pem
228- client_5.key
229- client_5.pk8
230- client_5_ca.pem
231- client_6.pem
232- client_6.key
233- client_6.pk8
234- client_6_ca.pem
235- client_1_u16_password.p12
236- client_root_ca.pem
237     This is a set of files used to unit test SSL client certificate
238     authentication.
239     - client_1_ca.pem and client_2_ca.pem are the certificates of
240       two distinct signing CAs.
241     - client_1.pem and client_1.key correspond to the certificate and
242       private key for a first certificate signed by client_1_ca.pem.
243     - client_2.pem and client_2.key correspond to the certificate and
244       private key for a second certificate signed by client_2_ca.pem.
245     - each .pk8 file contains the same key as the corresponding .key file
246       as PKCS#8 PrivateKeyInfo in DER encoding.
247     - client_3.pem is nearly identical to client_2.pem, except it is used
248       to test wifi EAP-TLS authentication so it uses a different set
249       of X509v3 extensions.  Specifically it includes two Subject
250       Alternative Name fields recognized by Chrome OS.
251     - client_4.pem is similar to client_2.pem but is a P-256 ECDSA key rather
252       than RSA.
253     - client_5.pem is similar to client_2.pem but is a P-384 ECDSA key rather
254       than RSA.
255     - client_6.pem is similar to client_2.pem but is a P-521 ECDSA key rather
256       than RSA.
257     - client_root_ca.pem is the CA certificate which signed client_*_ca.pem.
258     - client_1_u16_password.p12 contains the client_1.key and client_1.pem key
259       and certificate, but is encoded as a PKCS#12 file and has a password with
260       UTF-16 symbols ("Hello, 世界").
261
262===== From net/data/ssl/scripts/generate-bad-eku-certs.sh
263- eku-test-root.pem
264- non-crit-codeSigning-chain.pem
265- crit-codeSigning-chain.pem
266     Two code-signing certificates (eKU: codeSigning; eKU: critical,
267     codeSigning) which we use to test that clients are making sure that web
268     server certs are checked for correct eKU fields (when an eKU field is
269     present). Since codeSigning is not valid for web server auth, the checks
270     should fail.
271
272===== From net/data/ssl/scripts/generate-multi-root-test-chains.sh
273- multi-root-chain1.pem
274- multi-root-chain2.pem
275     Two chains, A -> B -> C -> D and A -> B -> C2 -> E (C and C2 share the
276     same public key) to test that certificate validation caching does not
277     interfere with the chain_verify_callback used by CertVerifyProcChromeOS.
278     See CertVerifyProcChromeOSTest.
279
280===== From net/data/ssl/scripts/generate-multi-root-keychain.sh
281- multi-root.keychain: An OSX Keychain containing the generated
282  certificates multi-root-*-by-*.pem
283
284===== From net/data/ssl/scripts/generate-duplicate-cn-certs.sh
285- duplicate_cn_1.p12
286- duplicate_cn_1.pem
287- duplicate_cn_2.p12
288- duplicate_cn_2.pem
289     Two certificates from the same issuer that share the same common name,
290     but have distinct subject names (namely, their O fields differ). NSS
291     requires that certificates have unique nicknames if they do not share the
292     same subject, and these certificates are used to test that the nickname
293     generation algorithm generates unique nicknames.
294     The .pem versions contain just the certs, while the .p12 versions contain
295     both the cert and a private key, since there are multiple ways to import
296     certificates into NSS.
297
298===== From net/data/ssl/scripts/generate-self-signed-certs.sh
299- self-signed-invalid-name.pem
300- self-signed-invalid-sig.pem
301     Two "self-signed" certificates with mismatched names or an invalid
302     signature, respectively.
303
304===== From net/data/ssl/scripts/generate-key-usage-certs.sh
305- key_usage_rsa_no_extension.pem
306- key_usage_rsa_keyencipherment.pem
307- key_usage_rsa_digitalsignature.pem
308- key_usage_rsa_both.pem
309     Self-signed RSA certificates with various combinations of keyUsage
310     flags. Their private key is key_usage_rsa.key.
311
312- key_usage_p256_no_extension.pem
313- key_usage_p256_keyagreement.pem
314- key_usage_p256_digitalsignature.pem
315- key_usage_p256_both.pem
316     Self-signed P-256 certificates with various combinations of keyUsage
317     flags. Their private key is key_usage_p256.key.
318
319===== From net/data/ssl/scripts/generate_2_client_certs_1_key.sh
320- 2_client_certs_1_key.p12
321     Key pair and two client certificates for it in a single .p12 file.
322