x509-cert: fix the IssuingDistributionPoint associated OID - #2396
Open
eyusd wants to merge 1 commit into
Open
Conversation
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.
carl-wallace
reviewed
Aug 7, 2026
| .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); |
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2389.
IssuingDistributionPointwas bound toID_PE_SUBJECT_INFO_ACCESS(1.3.6.1.5.5.7.1.11). That isid-pe-subjectInfoAccess, a certificate extension, andext/pkix/access.rsalready binds it toSubjectInfoAccessSyntax.issuingDistributionPointis 2.5.29.28 (RFC 5280 §5.2.5).Two tests in
tests/crl.rs: one on the constant, one that puts an IDP withindirectCRLset 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-fastgoes from 77 tests to 79, doc-tests unchanged at 10. The 5 failures intests/builder.rsarezlint: command not foundand 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.