• Home
Name Date Size #Lines LOC

..--

basic-constraints-pathlen-0-self-issued/03-May-2024-523478

expired-intermediate/03-May-2024-422380

expired-root/03-May-2024-508458

expired-target/03-May-2024-422380

incorrect-trust-anchor/03-May-2024-436392

intermediate-and-target-wrong-signature/03-May-2024-467420

intermediate-basic-constraints-ca-false/03-May-2024-399362

intermediate-basic-constraints-not-critical/03-May-2024-395359

intermediate-eku-any-and-clientauth/03-May-2024-432390

intermediate-eku-clientauth/03-May-2024-431389

intermediate-eku-server-gated-crypto/03-May-2024-864786

intermediate-lacks-basic-constraints/03-May-2024-396359

intermediate-lacks-signing-key-usage/03-May-2024-397360

intermediate-signed-with-sha1/03-May-2024-389365

intermediate-unknown-critical-extension/03-May-2024-404367

intermediate-unknown-non-critical-extension/03-May-2024-398362

intermediate-wrong-signature-no-authority-key-identifier/03-May-2024-445399

issuer-and-subject-not-byte-for-byte-equal/03-May-2024-743691

key-rollover/03-May-2024-1,7261,581

many-names/03-May-2024-49,09248,844

non-self-signed-root/03-May-2024-431392

pkits_errors/03-May-2024-441242

policies-inhibit-anypolicy-by-root-fail/03-May-2024-416390

policies-inhibit-anypolicy-by-root-ok/03-May-2024-413388

policies-inhibit-mapping-by-root-fail/03-May-2024-425398

policies-inhibit-mapping-by-root-ok/03-May-2024-422396

policies-ok/03-May-2024-405381

policies-on-root-ok/03-May-2024-419395

policies-on-root-wrong/03-May-2024-416391

policies-required-by-root-fail/03-May-2024-402377

policies-required-by-root-ok/03-May-2024-399375

policy-mappings-on-root-fail/03-May-2024-422397

policy-mappings-on-root-ok/03-May-2024-417393

root-basic-constraints-ca-false/03-May-2024-404366

root-eku-clientauth/03-May-2024-437393

root-lacks-basic-constraints/03-May-2024-414374

root-lacks-keycertsign-key-usage/03-May-2024-398373

target-and-intermediate/03-May-2024-448401

target-eku-any/03-May-2024-435391

target-eku-clientauth/03-May-2024-428385

target-eku-many/03-May-2024-443400

target-eku-none/03-May-2024-433388

target-has-512bit-rsa-key/03-May-2024-367330

target-has-ca-basic-constraints/03-May-2024-510479

target-has-keycertsign-but-not-ca/03-May-2024-398362

target-has-pathlen-but-not-ca/03-May-2024-398362

target-not-end-entity/03-May-2024-409370

target-only/03-May-2024-222195

target-selfissued/03-May-2024-204181

target-selfsigned/03-May-2024-175154

target-serverauth-various-keyusages/03-May-2024-2,3452,172

target-signed-by-512bit-rsa/03-May-2024-352315

target-signed-using-ecdsa/03-May-2024-355319

target-signed-with-sha1/03-May-2024-389365

target-unknown-critical-extension/03-May-2024-502471

target-wrong-signature/03-May-2024-430388

target-wrong-signature-no-authority-key-identifier/03-May-2024-445400

unknown-critical-policy-qualifier/03-May-2024-408369

unknown-non-critical-policy-qualifier/03-May-2024-403365

violates-basic-constraints-pathlen-0/03-May-2024-525480

violates-pathlen-1-from-root/03-May-2024-531485

READMED03-May-20243 KiB8866

generate-all.shD03-May-2024348 2210

rebase-errors.pyD03-May-20243.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===============================
75pkits_errors/*.txt
76===============================
77
78These files contain the expected errors for PKITS tests
79(third_party/nist-pkits). The file name correspond so the PKITS tests number.
80They are baselined specifically for VerifyCertificateChain().
81
82===============================
83generate-all.sh
84===============================
85
86Runs all of the generate-chains.py scripts and cleans up the temp files
87afterwards.
88