blob: 850237a84043502ac74406d212df829e81d55342 [file] [log] [blame]
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +01001This documents the X.509 CAs, certificates, and CRLS used for testing.
2
3Certification authorities
4-------------------------
5
6There are two main CAs for use as trusted roots:
7- test-ca.crt aka "C=NL, O=PolarSSL, CN=PolarSSL Test CA"
8 uses a RSA-2048 key
Gilles Peskinef040a172017-05-05 18:56:12 +02009 test-ca-sha1.crt and test-ca-sha256.crt use the same key, signed with
10 different hashes.
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010011- test-ca2*.crt aka "C=NL, O=PolarSSL, CN=Polarssl Test EC CA"
12 uses an EC key with NIST P-384 (aka secp384r1)
13 variants used to test the keyUsage extension
Hanno Becker4efd0892019-04-05 12:16:24 +010014- test-ca3.crt aka "CN=TestCASecp256r1, O=MbedTLS, C=UK"
15 uses an EC key with NIST P-256 (aka secp256r1)
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010016The files test-ca_cat12 and test-ca_cat21 contain them concatenated both ways.
17
18Two intermediate CAs are signed by them:
19- test-int-ca.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA"
20 uses RSA-4096, signed by test-ca2
Manuel Pégourié-Gonnard5faafa72017-08-17 10:13:00 +020021 - test-int-ca-exp.crt is a copy that is expired
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010022- test-int-ca2.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA"
Manuel Pégourié-Gonnard8b590492017-08-14 18:04:19 +020023 uses an EC key with NIST P-384, signed by test-ca
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010024
Manuel Pégourié-Gonnard560fea32015-09-01 11:59:24 +020025A third intermediate CA is signed by test-int-ca2.crt:
26- test-int-ca3.crt "C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3"
Manuel Pégourié-Gonnardd19a41d2017-07-14 11:05:59 +020027 uses an EC key with NIST P-256, signed by test-int-ca2
Manuel Pégourié-Gonnard560fea32015-09-01 11:59:24 +020028
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010029Finally, other CAs for specific purposes:
30- enco-ca-prstr.pem: has its CN encoded as a printable string, but child cert
31 enco-cert-utf8str.pem has its issuer's CN encoded as a UTF-8 string.
32- test-ca-v1.crt: v1 "CA", signs
33 server1-v1.crt: v1 "intermediate CA", signs
34 server2-v1*.crt: EE cert (without of with chain in same file)
Manuel Pégourié-Gonnard9a702252015-06-23 10:14:36 +020035- keyUsage.decipherOnly.crt: has the decipherOnly keyUsage bit set
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010036
37End-entity certificates
38-----------------------
39
40Short information fields:
41
42- name or pattern
43- issuing CA: 1 -> test-ca.crt
44 2 -> test-ca2.crt
Hanno Becker4efd0892019-04-05 12:16:24 +010045 3 -> test-ca3.crt
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010046 I1 -> test-int-ca.crt
47 I2 -> test-int-ca2.crt
Manuel Pégourié-Gonnard560fea32015-09-01 11:59:24 +020048 I3 -> test-int-ca3.crt
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010049 O -> other
50- key type: R -> RSA, E -> EC
51- C -> there is a CRL revoking this cert (see below)
52- L -> CN=localhost (useful for local test servers)
Manuel Pégourié-Gonnard560fea32015-09-01 11:59:24 +020053- P1, P2 if the file includes parent (resp. parent + grandparent)
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010054- free-form comments
55
56List of certificates:
57
58- cert_example_multi*.crt: 1/O R: subjectAltName
59- cert_example_wildcard.crt: 1 R: wildcard in subject's CN
60- cert_md*.crt, cert_sha*.crt: 1 R: signature hash
61- cert_v1_with_ext.crt: 1 R: v1 with extensions (illegal)
62- cli2.crt: 2 E: basic
Hanno Becker4efd0892019-04-05 12:16:24 +010063- cli3.crt: 3 E, secp256r1 curve
Gilles Peskinef040a172017-05-05 18:56:12 +020064- cli-rsa.key, cli-rsa-*.crt: RSA key used for test clients, signed by
65 the RSA test CA.
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010066- enco-cert-utf8str.pem: see enco-ca-prstr.pem above
Manuel Pégourié-Gonnard560fea32015-09-01 11:59:24 +020067- server1*.crt: 1* R C* P1*: misc *(server1-v1 see test-ca-v1.crt above)
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010068 *CRL for: .cert_type.crt, .crt, .key_usage.crt, .v1.crt
Manuel Pégourié-Gonnard560fea32015-09-01 11:59:24 +020069 P1 only for _ca.crt
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010070- server2-v1*.crt: O R: see test-ca-v1.crt above
71- server2*.crt: 1 R L: misc
72- server3.crt: 1 E L: EC cert signed by RSA CA
73- server4.crt: 2 R L: RSA cert signed by EC CA
Manuel Pégourié-Gonnard5faafa72017-08-17 10:13:00 +020074- server5*.crt: 2* E L: misc *(except -selfsigned and -ss-*)
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010075 -sha*: hashes
Manuel Pégourié-Gonnard5faafa72017-08-17 10:13:00 +020076 .eku*: extendeKeyUsage (cli/srv = www client/server, cs = codesign, etc)
77 .ku*: keyUsage (ds = signatures, ke/ka = key exchange/agreement)
78 .req*: CSR, not certificate
79 -der*: trailing bytes in der (?)
80 -badsign.crt: S5 with corrupted signature
81 -expired.crt: S5 with "not after" date in the past
82 -future.crt: S5 with "not before" date in the future
83 -selfsigned.crt: Self-signed cert with S5 key
84 -ss-expired.crt: Self-signed cert with S5 key, expired
85 -ss-forgeca.crt: Copy of test-int-ca3 self-signed with S5 key
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010086- server6-ss-child.crt: O E: "child" of non-CA server5-selfsigned
87- server6.crt, server6.pem: 2 E L C: revoked
Manuel Pégourié-Gonnard5faafa72017-08-17 10:13:00 +020088- server7.crt: I1 E L P1(usually): EC signed by RSA signed by EC
89 -badsign.crt: S7 with corrupted signature + I1
90 -expired.crt: S7 with "not after" date in the past + I1
91 -future.crt: S7 with "not before" date in the future + I1
92 _int-ca-exp.crt: S7 + expired I1
93 _int-ca.crt: S7 + I1
94 _int-ca_ca2.crt: S7 + I1 + 2
95 _all_space.crt: S7 + I1 both with misplaced spaces (invalid PEM)
96 _pem_space.crt: S7 with misplace space (invalid PEM) + I1
97 _trailing_space.crt: S7 + I1 both with trainling space (valid PEM)
98 _spurious_int-ca.crt: S7 + I2(spurious) + I1
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +010099- server8*.crt: I2 R L: RSA signed by EC signed by RSA (P1 for _int-ca2)
100- server9*.crt: 1 R C* L P1*: signed using RSASSA-PSS
101 *CRL for: 9.crt, -badsign, -with-ca (P1)
Manuel Pégourié-Gonnard5faafa72017-08-17 10:13:00 +0200102- server10.crt: I3 E L
103 -badsign.crt: S10 with corrupted signature
104 -bs_int3.pem: S10-badsign + I3
105 _int3-bs.pem: S10 + I3-badsign
106 _int3_int-ca2.crt: S10 + I3 + I2
107 _int3_int-ca2_ca.crt: S10 + I3 + I2 + 1
108 _int3_spurious_int-ca2.crt: S10 + I3 + I1(spurious) + I2
Hanno Becker4efd0892019-04-05 12:16:24 +0100109 - server11.crt: 3 E, secp256r1 curve
Jarno Lamsa6f54fe72019-10-29 15:15:58 +0200110 -bad.crt.der: S11 with corrupted public key and signature
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +0100111
112Certificate revocation lists
113----------------------------
114
115Signing CA in parentheses (same meaning as certificates).
116
Manuel Pégourié-Gonnard6ea831d2015-06-22 16:50:52 +0200117- crl-ec-sha*.pem: (2) server6.crt
Paul Bakker6152b022015-04-14 15:00:09 +0200118- crl-future.pem: (2) server6.crt + unknown
Manuel Pégourié-Gonnard4be34492014-11-19 12:52:43 +0100119- crl-rsa-pss-*.pem: (1) server9{,badsign,with-ca}.crt + cert_sha384.crt + unknown
120- crl.pem, crl_expired.pem: (1) server1{,.cert_type,.key_usage,.v1}.crt + unknown
121- crl_md*.pem: crl_sha*.pem: (1) same as crl.pem
122- crt_cat_*.pem: (1+2) concatenations in various orders:
123 ec = crl-ec-sha256.pem, ecfut = crl-future.pem
124 rsa = crl.pem, rsabadpem = same with pem error, rsaexp = crl_expired.pem
125
126Note: crl_future would revoke server9 and cert_sha384.crt if signed by CA 1
127 crl-rsa-pss* would revoke server6.crt if signed by CA 2
Gilles Peskinef040a172017-05-05 18:56:12 +0200128
129Generation
130----------
131
132Newer test files have been generated through commands in the Makefile. The
133resulting files are committed to the repository so that the tests can
134run without having to re-do the generation and so that the output is the
135same for everyone (the generation process is randomized).
136
137The origin of older certificates has not been recorded.