Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional test cases sourced from x509test (experimental) #255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions tests/data/fake-ca.cert
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
-----BEGIN CERTIFICATE-----
MIIDpzCCAo+gAwIBAgIEBAbK/jANBgkqhkiG9w0BAQsFADBxMQswCQYDVQQGEwJH
QjEPMA0GA1UECBMGTG9uZG9uMQ8wDQYDVQQHEwZMb25kb24xDzANBgNVBAoTBkdv
b2dsZTEMMAoGA1UECxMDRW5nMSEwHwYDVQQDExhGYWtlQ2VydGlmaWNhdGVBdXRo
b3JpdHkwHhcNMjIwMjI2MTEzNTU2WhcNMjMwMjI2MTEzNTU2WjBxMQswCQYDVQQG
EwJHQjEPMA0GA1UECBMGTG9uZG9uMQ8wDQYDVQQHEwZMb25kb24xDzANBgNVBAoT
Bkdvb2dsZTEMMAoGA1UECxMDRW5nMSEwHwYDVQQDExhGYWtlQ2VydGlmaWNhdGVB
dXRob3JpdHkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDH7YBnivKV
qNrzbdxGZfWQ98UK8OKB9zJeNEpLOoKEQDjS8at/0QTKDUtlbRxFOJnt7jHPGiNO
ZlSa7MZXaoVjkRwxDyXxXF3QtMNWeUjIeUrSOtfVXqLuO6vIHYxyZhgfizkD1BI2
k8HRefSxhsk1ik+nV4PQgcOxW8yZawvj3RdJ17u4XMRYhmbn0wsx8Hykfat3/Hl2
mupZB6iziovy/iEtR0KXmg3274OqMrlLNqHyLfpE78N/HDJgN+tSLbZv8bVPpYDs
hCfuYbqHih/vMgX3F8or5MTx6MDM4dzKazz+EbFy3X5uySYkH1wml2Rgl1RaS1uX
7gxKYX0G28CNAgMBAAGjRzBFMA0GA1UdDgQGBAQBAgMEMA8GA1UdIwQIMAaABAEC
AwQwEgYDVR0TAQH/BAgwBgEB/wIBCjAPBgNVHQ8BAf8EBQMDB/+AMA0GCSqGSIb3
DQEBCwUAA4IBAQBr2jezfOsPIRKPMYvh+N0f/qzwDULU7Mjn8FVHIYR+DgeMtOhD
A9+r8DjE8C/2eP+wGoPRxyNRM+awkcdLf5tm/vdwQ9eEQ8XPCkQ8khcZz1sVt5ku
7v1lWhxOGtJ9ley1Df31U61RPlIK3PPHcHW/JyQcr/yqSizT3xtpG+QS/SYcV9ug
wk4pd6QjBgLEyrIQ/OlXRcKVnA9g8Mpj4O8KME5Nd+C+LDWG+g9gvD4Fp3/SPF96
9bv1o6pErHMfriMyDsQFGzuYO/stMaxiok1zpTpx1al4eDpro3EYjJDS8LtW5LGp
I1Ie0g6GeBIN5JbKWytoFgA5VEBBh0WlQ3EH
-----END CERTIFICATE-----
Binary file added tests/data/fake-ca.der
Binary file not shown.
Empty file added tests/data/ok-ca.der
Empty file.
Binary file added tests/data/ok-ext-auth-info-access.der
Binary file not shown.
Binary file added tests/data/ok-ext-auth-keyid.der
Binary file not shown.
Binary file added tests/data/ok-ext-auth-keyid2.der
Binary file not shown.
Binary file added tests/data/ok-ext-basic-constraints.der
Binary file not shown.
Binary file added tests/data/ok-ext-cert-policies-any-qual.der
Binary file not shown.
Binary file added tests/data/ok-ext-cert-policies-any.der
Binary file not shown.
Binary file added tests/data/ok-ext-cert-policies-ia5-unotice.der
Binary file not shown.
Binary file added tests/data/ok-ext-cert-policies-unotice.der
Binary file not shown.
Binary file added tests/data/ok-ext-cert-policies.der
Binary file not shown.
Binary file added tests/data/ok-ext-crl-point.der
Binary file not shown.
Binary file added tests/data/ok-ext-ct-sct.der
Binary file not shown.
Binary file added tests/data/ok-ext-extended-key-usage.der
Binary file not shown.
Binary file added tests/data/ok-ext-extended-key-usage2.der
Binary file not shown.
Binary file added tests/data/ok-ext-freshest-crl.der
Binary file not shown.
Binary file added tests/data/ok-ext-inhibit-anypolicy.der
Binary file not shown.
Binary file added tests/data/ok-ext-issuer-altname.der
Binary file not shown.
Binary file added tests/data/ok-ext-key-usage.der
Binary file not shown.
Binary file added tests/data/ok-ext-name-constraints.der
Binary file not shown.
Binary file added tests/data/ok-ext-policy-constraints.der
Binary file not shown.
Binary file added tests/data/ok-ext-policy-map.der
Binary file not shown.
Binary file added tests/data/ok-ext-subject-altname.der
Binary file not shown.
Binary file added tests/data/ok-ext-subject-altname2.der
Binary file not shown.
Binary file added tests/data/ok-ext-subject-dirattr.der
Binary file not shown.
Binary file added tests/data/ok-ext-subject-info-access.der
Binary file not shown.
Binary file added tests/data/ok-ext-subject-keyid.der
Binary file not shown.
Binary file added tests/data/ok-indefinite-expiry.der
Binary file not shown.
Binary file added tests/data/ok-inherited-keyparams.ca.der
Binary file not shown.
Binary file added tests/data/ok-inherited-keyparams.leaf.der
Binary file not shown.
Binary file added tests/data/ok-intermediate-ca-sign.ca.der
Binary file not shown.
Binary file added tests/data/ok-intermediate-ca-sign.leaf.der
Binary file not shown.
Binary file added tests/data/ok-issuer-asn1-differ.der
Binary file not shown.
Binary file added tests/data/ok-long-expiry.der
Binary file not shown.
Binary file added tests/data/ok-long-serial.der
Binary file not shown.
Binary file added tests/data/ok-pubkey-ecdsa-p256v1.der
Binary file not shown.
Binary file added tests/data/ok-pubkey-rsa.der
Binary file not shown.
Binary file added tests/data/ok-uniqueid-incomplete-byte.der
Binary file not shown.
Binary file added tests/data/ok-utc-time-wrap.der
Binary file not shown.
Binary file added tests/data/ok-v1.der
Binary file not shown.
Binary file added tests/data/ok-v2-issuer-asn1-differ.der
Binary file not shown.
Binary file added tests/data/ok-v2.der
Binary file not shown.
Binary file added tests/data/ok-v3.der
Binary file not shown.
Binary file added tests/data/xf-algo-mismatch1.der
Binary file not shown.
Binary file added tests/data/xf-der-invalid-bitstring.der
Binary file not shown.
Binary file added tests/data/xf-der-invalid-nonminimal-int.der
Binary file not shown.
Binary file added tests/data/xf-der-invalid-uniqueid.der
Binary file not shown.
Binary file added tests/data/xf-der-pubkey-rsa-nonminimal-int.der
Binary file not shown.
Binary file added tests/data/xf-duplicate-extension.der
Binary file not shown.
Binary file added tests/data/xf-duplicate-extension2.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-blank-domain.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-critical-subject.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-email-only.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-empty2.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-excluded.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-excluded.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-invalid-domain.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-invalid-email.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-invalid-encoding.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-ip-wrong.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-noncrit-nosubj.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-relative-uri.der
Binary file not shown.
Binary file added tests/data/xf-ext-altname-schemeless-uri.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-info-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-info-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-keyid-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-keyid-invalid-issuer.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-keyid-mismatch.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-keyid-noid.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-keyid-onlyserial.der
Binary file not shown.
Binary file added tests/data/xf-ext-auth-keyid-serial-mismatch.der
Binary file not shown.
Binary file added tests/data/xf-ext-cert-policies-any-qual.der
Binary file not shown.
Binary file added tests/data/xf-ext-cert-policies-bmp-unotice.der
Binary file not shown.
Binary file added tests/data/xf-ext-cert-policies-dup.der
Binary file not shown.
Binary file added tests/data/xf-ext-cert-policies-unotice-ch.der
Binary file not shown.
Binary file added tests/data/xf-ext-constraints-neg-pathlen.der
Binary file not shown.
Binary file added tests/data/xf-ext-constraints-noncritical.der
Binary file not shown.
Binary file added tests/data/xf-ext-constraints-path-nonca.der
Binary file not shown.
Binary file added tests/data/xf-ext-constraints-path-nosign.der
Binary file not shown.
Binary file added tests/data/xf-ext-crl-point-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-crl-point-reasons-only.der
Binary file not shown.
Binary file added tests/data/xf-ext-ct-poison.der
Binary file not shown.
Binary file added tests/data/xf-ext-ct-sct-trailing-data.der
Binary file not shown.
Binary file added tests/data/xf-ext-ct-sct-wrong-type.der
Binary file not shown.
Binary file added tests/data/xf-ext-extended-any-key-usage.der
Binary file not shown.
Binary file added tests/data/xf-ext-extended-key-usage-empty-oid.der
Binary file not shown.
Binary file added tests/data/xf-ext-extended-key-usage-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-freshest-crl-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-inhibit-anypolicy-negative.der
Binary file not shown.
Binary file added tests/data/xf-ext-inhibit-anypolicy-noncritical.der
Binary file not shown.
Binary file added tests/data/xf-ext-issuer-altname-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-noncritical.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-sign-nonca.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-too-long.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-wrong-der.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-wrong.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-key-usage-wrong.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-keysign-nonca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-constraints-badip.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-constraints-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-constraints-minmax.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-constraints-nonca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-constraints-noncrit.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-constraints-regid.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-dn.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-dn.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-dns.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-dns.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-email.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-email.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-email2.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-email2.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-ip.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-ip.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-uri.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-uri.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-uri2.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded-uri2.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded.ca.der
Binary file not shown.
Binary file added tests/data/xf-ext-name-excluded.leaf.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-constraint-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-constraint-noncrit.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-map-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-map-from-any.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-map-noncritical.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-map-to-any.der
Binary file not shown.
Binary file added tests/data/xf-ext-policy-map-unref.der
Binary file not shown.
Binary file added tests/data/xf-ext-subject-dirattr-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-subject-dirattr-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-subject-info-critical.der
Binary file not shown.
Binary file added tests/data/xf-ext-subject-info-empty.der
Binary file not shown.
Binary file added tests/data/xf-ext-subject-keyid-ca-absent.der
Binary file not shown.
Binary file added tests/data/xf-ext-subject-keyid-critical.der
Binary file not shown.
Binary file added tests/data/xf-gentime-fraction-secs.der
Binary file not shown.
Binary file added tests/data/xf-gentime-no-secs.der
Binary file not shown.
Binary file added tests/data/xf-gentime-nonzulu.der
Binary file not shown.
Binary file added tests/data/xf-issuer-mismatch-v2.der
Binary file not shown.
Binary file added tests/data/xf-issuer-mismatch1.der
Binary file not shown.
Binary file added tests/data/xf-key-usage-nonsign-maybe1.ca.der
Binary file not shown.
Binary file added tests/data/xf-key-usage-nonsign-maybe1.leaf.der
Binary file not shown.
Binary file added tests/data/xf-key-usage-nonsign-maybe2.ca.der
Binary file not shown.
Binary file added tests/data/xf-key-usage-nonsign-maybe2.leaf.der
Binary file not shown.
Binary file added tests/data/xf-key-usage-nonsign.ca.der
Binary file not shown.
Binary file added tests/data/xf-key-usage-nonsign.leaf.der
Binary file not shown.
Binary file added tests/data/xf-key-usages-empty.ca.der
Binary file not shown.
Binary file added tests/data/xf-key-usages-empty.leaf.der
Binary file not shown.
Binary file added tests/data/xf-key-usages-empty2.ca.der
Binary file not shown.
Binary file added tests/data/xf-key-usages-empty2.leaf.der
Binary file not shown.
Binary file added tests/data/xf-nonca-sign-maybe1.ca.der
Binary file not shown.
Binary file added tests/data/xf-nonca-sign-maybe1.leaf.der
Binary file not shown.
Binary file added tests/data/xf-nonca-sign-maybe2.ca.der
Binary file not shown.
Binary file added tests/data/xf-nonca-sign-maybe2.leaf.der
Binary file not shown.
Binary file added tests/data/xf-nonca-sign.ca.der
Binary file not shown.
Binary file added tests/data/xf-nonca-sign.leaf.der
Binary file not shown.
Binary file added tests/data/xf-pubkey-ecdsa-not-on-curve.der
Binary file not shown.
Binary file added tests/data/xf-pubkey-ecdsa-secp192r1.der
Binary file not shown.
Binary file added tests/data/xf-pubkey-ecdsa-unknown-curve.der
Binary file not shown.
Binary file added tests/data/xf-pubkey-rsa-exponent-negative.der
Binary file not shown.
Binary file added tests/data/xf-pubkey-rsa-modulus-negative.der
Binary file not shown.
Binary file added tests/data/xf-pubkey-rsa-param-nonnull.der
Binary file not shown.
Binary file added tests/data/xf-serial-negative.der
Binary file not shown.
Binary file added tests/data/xf-serial-zero.der
Binary file not shown.
Binary file added tests/data/xf-soon-generalized-time.der
Binary file not shown.
Binary file added tests/data/xf-subject-nonprintable.der
Binary file not shown.
Binary file added tests/data/xf-subject-t61.der
Binary file not shown.
Binary file added tests/data/xf-unknown-critical-ext.der
Binary file not shown.
Binary file added tests/data/xf-utctime-no-secs.der
Binary file not shown.
Binary file added tests/data/xf-utctime-nonzulu.der
Binary file not shown.
Binary file added tests/data/xf-v1-extensions.der
Binary file not shown.
Binary file added tests/data/xf-v1-uniqueid.der
Binary file not shown.
Binary file added tests/data/xf-v2-extensions.der
Binary file not shown.
Binary file added tests/data/xf-v3-uniqueid-noexts1.der
Binary file not shown.
Binary file added tests/data/xf-v3-uniqueid-noexts2.der
Binary file not shown.
1,979 changes: 1,979 additions & 0 deletions tests/x509test.rs

Large diffs are not rendered by default.