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

der: add IndefiniteLength type #830

Merged
merged 1 commit into from
Jan 2, 2023
Merged

der: add IndefiniteLength type #830

merged 1 commit into from
Jan 2, 2023

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 2, 2023

Per #823 and #827, making PKCS#7 work interoperably will involve supporting at limited number of BER productions, one of which is indefinite lengths.

The current built-in Length type rejects them, as a proper DER parser is expected to.

This commit adds a separate IndefiniteLength type as a newtype of Option<Length> with support for parsing indefinite lengths.

Per #823 and #827, making PKCS#7 work interoperably will involve
supporting at limited number of BER productions, one of which is
indefinite lengths.

The current built-in `Length` type rejects them, as a proper DER parser
is expected to.

This commit adds a separate `IndefiniteLength` type as a newtype of
`Option<Length>` with support for parsing indefinite lengths.
@tarcieri tarcieri force-pushed the der/indefinite-length branch from 7ed19a6 to 2207be5 Compare January 2, 2023 16:26
@tarcieri tarcieri merged commit 1f1dd1a into master Jan 2, 2023
@tarcieri tarcieri deleted the der/indefinite-length branch January 2, 2023 16:49
@tarcieri tarcieri mentioned this pull request Feb 27, 2023
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.

1 participant