Skip to content

x509-cert: fix the IssuingDistributionPoint associated OID - #2396

Open
eyusd wants to merge 1 commit into
RustCrypto:masterfrom
eyusd:fix-idp-oid
Open

x509-cert: fix the IssuingDistributionPoint associated OID#2396
eyusd wants to merge 1 commit into
RustCrypto:masterfrom
eyusd:fix-idp-oid

Conversation

@eyusd

@eyusd eyusd commented Aug 6, 2026

Copy link
Copy Markdown

Fixes #2389.

IssuingDistributionPoint was bound to ID_PE_SUBJECT_INFO_ACCESS (1.3.6.1.5.5.7.1.11). That is id-pe-subjectInfoAccess, a certificate extension, and ext/pkix/access.rs already binds it to SubjectInfoAccessSyntax. issuingDistributionPoint is 2.5.29.28 (RFC 5280 §5.2.5).

Two tests in tests/crl.rs: one on the constant, one that puts an IDP with indirectCRL set on the wire and locates it by associated OID. Both fail before this change and pass after.

cargo test -p x509-cert --all-features --no-fail-fast goes from 77 tests to 79, doc-tests unchanged at 10. The 5 failures in tests/builder.rs are zlint: command not found and are identical on unmodified master, since I don't have zlint installed.

impl_extension! uses the same constant, so this also changes the OID written on encode. That makes it a behaviour change for anyone who has worked around the old value.

IssuingDistributionPoint was bound to id-pe-subjectInfoAccess
(1.3.6.1.5.5.7.1.11). That is a certificate extension, and access.rs
already binds it to SubjectInfoAccessSyntax. issuingDistributionPoint
is 2.5.29.28, per RFC 5280 section 5.2.5.

Because impl_extension! reads the same constant, this also corrects the
OID written on encode.

Add two regression tests to tests/crl.rs: one on the constant itself,
one that puts an IDP with indirectCRL set on the wire and locates it by
associated OID.
Comment thread x509-cert/tests/crl.rs
.find(|e| e.extn_id == IssuingDistributionPoint::OID)
.expect("IDP extension located by IssuingDistributionPoint::OID");
let decoded = IssuingDistributionPoint::from_der(found.extn_value.as_bytes()).unwrap();
assert!(decoded.indirect_crl);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be good to add a round trip encode/decode cycle and/or a test that uses an example read from a CRL. There're are a few in the PKITS data set, including https://github.com/carl-wallace/rust-pki/blob/main/certval/tests/examples/PKITS_data_2048/crls/indirectCRLCA1CRL.crl.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IssuingDistributionPoint has the wrong AssociatedOid (id-pe-subjectInfoAccess)

2 participants