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

Error parsing INTEGER with 64-bit value range #79

Open
awm129 opened this issue Jul 19, 2023 · 0 comments
Open

Error parsing INTEGER with 64-bit value range #79

awm129 opened this issue Jul 19, 2023 · 0 comments

Comments

@awm129
Copy link

awm129 commented Jul 19, 2023

I'm trying to use asn1rs 0.2.2 with the following ASN.1 subtype definition:

Uint64 ::= INTEGER (0..18446744073709551615)

when I run asn1rs from the shell I get:

[tmp]$ asn1rs --version
asn1rs 0.2.2
[tmp]$ asn1rs . ../int_types.asn1 
Failed to convert: ResolveError(FailedToResolveReference("18446744073709551615"))

The above definition compiles successfully with asn1c v0.9.29.

While I can leave this unconstrained as a work around, the ASN.1 spec allows for value ranges larger than those that can be represented in 64 bits. The maximum upper bound I'm able to use successfully with asn1rs appears to be equivalent to i64::MAX.

@awm129 awm129 changed the title Error parsing INTEGER with 64-bit bounds Error parsing INTEGER with 64-bit constraint Jul 20, 2023
@awm129 awm129 changed the title Error parsing INTEGER with 64-bit constraint Error parsing INTEGER with 64-bit value range Jul 20, 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

No branches or pull requests

1 participant