mouse07410 / asn1c

The ASN.1 Compiler
http://lionet.info/asn1c/
BSD 2-Clause "Simplified" License
93 stars 70 forks source link

jer: INTEGER and ENUMERATED compliant decoding #149

Closed v0-e closed 8 months ago

v0-e commented 8 months ago

Sets up the JER INTEGER decoder, previously based on XER INTEGER decoding logic, to only accept INTEGER values which follow the X.697 rules, i.e., no leading zeroes, no hexadecimal values, no strings. Given that this change also affects the ENUMERATED type, which should only accept strings according to the standard, associated changes were also added to this PR. Since INTEGER deals now only with JSON numbers and ENUMERATED deals only with JSON strings, ENUMERATED decoding logic was moved to its own file.

Related tests were also added.

X.697 sections 21 and 22 (2021)