Name Date Size #Lines LOC

..--

basic-constraints-pathlen-0-self-issued/H25-Apr-2025-523478

expired-intermediate/H25-Apr-2025-422380

expired-root/H25-Apr-2025-508458

expired-target/H25-Apr-2025-422380

incorrect-trust-anchor/H25-Apr-2025-436392

intermediate-and-target-wrong-signature/H25-Apr-2025-467420

intermediate-basic-constraints-ca-false/H25-Apr-2025-399362

intermediate-basic-constraints-not-critical/H25-Apr-2025-395359

intermediate-eku-any-and-clientauth/H25-Apr-2025-432390

intermediate-eku-clientauth/H25-Apr-2025-431389

intermediate-eku-server-gated-crypto/H25-Apr-2025-864786

intermediate-lacks-basic-constraints/H25-Apr-2025-396359

intermediate-lacks-signing-key-usage/H25-Apr-2025-397360

intermediate-signed-with-sha1/H25-Apr-2025-389365

intermediate-unknown-critical-extension/H25-Apr-2025-404367

intermediate-unknown-non-critical-extension/H25-Apr-2025-398362

intermediate-wrong-signature-no-authority-key-identifier/H25-Apr-2025-445399

issuer-and-subject-not-byte-for-byte-equal/H25-Apr-2025-743691

key-rollover/H25-Apr-2025-1,7261,581

many-names/H25-Apr-2025-49,09248,844

non-self-signed-root/H25-Apr-2025-431392

pkits_errors/H25-Apr-2025-441242

policies-inhibit-anypolicy-by-root-fail/H25-Apr-2025-416390

policies-inhibit-anypolicy-by-root-ok/H25-Apr-2025-413388

policies-inhibit-mapping-by-root-fail/H25-Apr-2025-425398

policies-inhibit-mapping-by-root-ok/H25-Apr-2025-422396

policies-ok/H25-Apr-2025-405381

policies-on-root-ok/H25-Apr-2025-419395

policies-on-root-wrong/H25-Apr-2025-416391

policies-required-by-root-fail/H25-Apr-2025-402377

policies-required-by-root-ok/H25-Apr-2025-399375

policy-mappings-on-root-fail/H25-Apr-2025-422397

policy-mappings-on-root-ok/H25-Apr-2025-417393

root-basic-constraints-ca-false/H25-Apr-2025-404366

root-eku-clientauth/H25-Apr-2025-437393

root-lacks-basic-constraints/H25-Apr-2025-414374

root-lacks-keycertsign-key-usage/H25-Apr-2025-398373

target-and-intermediate/H25-Apr-2025-448401

target-eku-any/H25-Apr-2025-435391

target-eku-clientauth/H25-Apr-2025-428385

target-eku-many/H25-Apr-2025-443400

target-eku-none/H25-Apr-2025-433388

target-has-512bit-rsa-key/H25-Apr-2025-367330

target-has-ca-basic-constraints/H25-Apr-2025-510479

target-has-keycertsign-but-not-ca/H25-Apr-2025-398362

target-has-pathlen-but-not-ca/H25-Apr-2025-398362

target-msapplicationpolicies-and-eku/H25-Apr-2025-395371

target-msapplicationpolicies-no-eku/H25-Apr-2025-399374

target-not-end-entity/H25-Apr-2025-409370

target-only/H25-Apr-2025-222195

target-selfissued/H25-Apr-2025-204181

target-selfsigned/H25-Apr-2025-175154

target-serverauth-various-keyusages/H25-Apr-2025-2,3452,172

target-signed-by-512bit-rsa/H25-Apr-2025-352315

target-signed-using-ecdsa/H25-Apr-2025-355319

target-signed-with-sha1/H25-Apr-2025-389365

target-unknown-critical-extension/H25-Apr-2025-502471

target-wrong-signature/H25-Apr-2025-430388

target-wrong-signature-no-authority-key-identifier/H25-Apr-2025-445400

unknown-critical-policy-qualifier/H25-Apr-2025-408369

unknown-non-critical-policy-qualifier/H25-Apr-2025-403365

violates-basic-constraints-pathlen-0/H25-Apr-2025-525480

violates-pathlen-1-from-root/H25-Apr-2025-531485

READMEH A D25-Apr-20252.7 KiB8060

generate-all.shH A D25-Apr-2025348 2210

rebase-errors.pyH A D25-Apr-20253.6 KiB12882

README

1This directory contains test data for verifying certificate chains.
2
3Tests are grouped into directories that contain the keys, python to generate
4chains, and test expectations. "DIR" is used as a generic placeholder below to
5identify such a directory.
6
7===============================
8DIR/generate-chains.py
9===============================
10
11Python script that generates one or more ".pem" file containing a sequence of
12CERTIFICATE blocks. In most cases it will generate a single chain called
13"chain.pem".
14
15===============================
16DIR/keys/*.key
17===============================
18
19The keys used (as well as generated) by the .py file generate-chains.py. The
20private keys shouldn't be needed to run the tests, however are useful when
21re-generating the test data to have stable results (at least for signature
22types which are deterministic, like RSASSA PKCS#1 which is used by most of the
23certificates data).
24
25===============================
26DIR/*.pem
27===============================
28
29A sequence of CERTIFICATE blocks that was created by the generate-chains.py
30script. (Although in a few cases there are manually created .pem files that
31lack a generator script).
32
33===============================
34DIR/*.test
35===============================
36
37A sequence of key-value pairs that identify the inputs to certificate
38verification, as well as the expected outputs. The format is essentially a
39newline separated sequence of key/value pairs:
40
41key: value\n
42
43All keys must be specified by tests, although they can be in any order.
44The possible keys are:
45
46  "chain" - The value is a file path (relative to the test file) to a .pem
47      containing the CERTIFICATE chain.
48
49  "last_cert_trust" - The value identifies the trustedness of the last
50      certificate in the chain (i.e. whether it is a trust anchor or not). This
51      maps to the CertificateTrustType enum. Possible values are:
52          "TRUSTED_ANCHOR"
53          "TRUSTED_ANCHOR_WITH_EXPIRATION"
54          "TRUSTED_ANCHOR_WITH_CONSTRAINTS"
55          "UNSPECIFIED"
56          "DISTRUSTED"
57
58  "utc_time" - A string encoding for the generalized time at which verification
59      should be done. Example "150302120000Z"
60
61  "key_purpose" - The expected EKU to use when verifying. Maps to
62      KeyPurpose enum. Possible values are:
63      "ANY_EKU"
64      "SERVER_AUTH"
65      "CLIENT_AUTH"
66
67  "errors" - This has special parsing rules: it is interpreted as the
68      final key in the file. All lines after "errors:\n" are read as being the
69      error string (this allows embedding newlines in it).
70
71Additionally, it is possible to add python-style comments by starting a line
72with "#".
73
74===============================
75generate-all.sh
76===============================
77
78Runs all of the generate-chains.py scripts and cleans up the temp files
79afterwards.
80