unplugged-system/external/cronet/net/data/verify_certificate_chain_unittest
2025-10-06 13:59:42 +00:00
..
basic-constraints-pathlen-0-self-issued Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
expired-intermediate Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
expired-root Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
expired-target Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
incorrect-trust-anchor Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-and-target-wrong-signature Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-basic-constraints-ca-false Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-basic-constraints-not-critical Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-eku-any-and-clientauth Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-eku-clientauth Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-eku-server-gated-crypto Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-lacks-basic-constraints Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-lacks-signing-key-usage Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-signed-with-sha1 Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-unknown-critical-extension Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-unknown-non-critical-extension Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
intermediate-wrong-signature-no-authority-key-identifier Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
issuer-and-subject-not-byte-for-byte-equal Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
key-rollover Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
many-names Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
non-self-signed-root Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
pkits_errors Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-inhibit-anypolicy-by-root-fail Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-inhibit-anypolicy-by-root-ok Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-inhibit-mapping-by-root-fail Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-inhibit-mapping-by-root-ok Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-ok Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-on-root-ok Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-on-root-wrong Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-required-by-root-fail Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policies-required-by-root-ok Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policy-mappings-on-root-fail Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
policy-mappings-on-root-ok Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
root-basic-constraints-ca-false Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
root-eku-clientauth Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
root-lacks-basic-constraints Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
root-lacks-keycertsign-key-usage Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-and-intermediate Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-eku-any Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-eku-clientauth Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-eku-many Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-eku-none Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-has-512bit-rsa-key Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-has-ca-basic-constraints Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-has-keycertsign-but-not-ca Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-has-pathlen-but-not-ca Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-not-end-entity Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-only Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-selfissued Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-selfsigned Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-serverauth-various-keyusages Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-signed-by-512bit-rsa Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-signed-using-ecdsa Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-signed-with-sha1 Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-unknown-critical-extension Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-wrong-signature Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
target-wrong-signature-no-authority-key-identifier Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
unknown-critical-policy-qualifier Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
unknown-non-critical-policy-qualifier Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
violates-basic-constraints-pathlen-0 Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
violates-pathlen-1-from-root Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
generate-all.sh Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
README Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00
rebase-errors.py Initial commit: AOSP 14 with modifications for Unplugged OS 2025-10-06 13:59:42 +00:00

This directory contains test data for verifying certificate chains.

Tests are grouped into directories that contain the keys, python to generate
chains, and test expectations. "DIR" is used as a generic placeholder below to
identify such a directory.

===============================
DIR/generate-chains.py
===============================

Python script that generates one or more ".pem" file containing a sequence of
CERTIFICATE blocks. In most cases it will generate a single chain called
"chain.pem".

===============================
DIR/keys/*.key
===============================

The keys used (as well as generated) by the .py file generate-chains.py. The
private keys shouldn't be needed to run the tests, however are useful when
re-generating the test data to have stable results (at least for signature
types which are deterministic, like RSASSA PKCS#1 which is used by most of the
certificates data).

===============================
DIR/*.pem
===============================

A sequence of CERTIFICATE blocks that was created by the generate-chains.py
script. (Although in a few cases there are manually created .pem files that
lack a generator script).

===============================
DIR/*.test
===============================

A sequence of key-value pairs that identify the inputs to certificate
verification, as well as the expected outputs. The format is essentially a
newline separated sequence of key/value pairs:

key: value\n

All keys must be specified by tests, although they can be in any order.
The possible keys are:

  "chain" - The value is a file path (relative to the test file) to a .pem
      containing the CERTIFICATE chain.

  "last_cert_trust" - The value identifies the trustedness of the last
      certificate in the chain (i.e. whether it is a trust anchor or not). This
      maps to the CertificateTrustType enum. Possible values are:
          "TRUSTED_ANCHOR"
          "TRUSTED_ANCHOR_WITH_EXPIRATION"
          "TRUSTED_ANCHOR_WITH_CONSTRAINTS"
          "UNSPECIFIED"
          "DISTRUSTED"

  "utc_time" - A string encoding for the generalized time at which verification
      should be done. Example "150302120000Z"

  "key_purpose" - The expected EKU to use when verifying. Maps to
      KeyPurpose enum. Possible values are:
      "ANY_EKU"
      "SERVER_AUTH"
      "CLIENT_AUTH"

  "errors" - This has special parsing rules: it is interpreted as the
      final key in the file. All lines after "errors:\n" are read as being the
      error string (this allows embedding newlines in it).

Additionally, it is possible to add python-style comments by starting a line
with "#".

===============================
pkits_errors/*.txt
===============================

These files contain the expected errors for PKITS tests
(third_party/nist-pkits). The file name correspond so the PKITS tests number.
They are baselined specifically for VerifyCertificateChain().

===============================
generate-all.sh
===============================

Runs all of the generate-chains.py scripts and cleans up the temp files
afterwards.