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: return Tag::Integer.length_error() on empty ints #1400

Merged
merged 1 commit into from
May 8, 2024

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented May 8, 2024

From X.690 § 8.3.1:

8.3 Encoding of an integer value
8.3.1 The encoding of an integer value shall be primitive.
The contents octets shall consist of one or more octets.

Previously this returned ErrorKind::Noncanonical, however this restriction applies to all INTEGER encodings including BER, so ErrorKind::Length is more appropriate.

From X.690 § 8.3.1:

> 8.3 Encoding of an integer value
> 8.3.1 The encoding of an integer value shall be primitive.
> The contents octets shall consist of one or more octets.
@tarcieri tarcieri force-pushed the der/return-errorkind-length-empty-integer branch from 341d683 to e0cefea Compare May 8, 2024 13:15
@tarcieri tarcieri merged commit 471c073 into master May 8, 2024
106 checks passed
@tarcieri tarcieri deleted the der/return-errorkind-length-empty-integer branch May 8, 2024 13:58
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