Question about DER encoding discrepancy between versions (0.7 -> 0.8) #217
Labels
area/codec
Related to a new or existing ASN.1 codec.
good first issue
Good for newcomers
help wanted
Extra attention is needed
kind/bug
Something isn't working
Hi! I had some tests for my project to make sure the serialization format is preserved across project updates. I was initially only testing deserialization but recently made a change in my project that made testing serialization deterministically possible as well. The interesting thing is that I noticed the serialization format changed from when I wrote the test (this was back on v0.7).
I wrote a quick test to check this out and came up with two results:
In v0.7 this produces (https://lapo.it/asn1js/#oQIwAA):
And in v0.8 this produces (https://lapo.it/asn1js/#oQQwAqAA):
I'm not entirely sure which one "correct" now. It seems v0.8+ encode
None
as their own sequence instead of omitting the value...is this the desired behavior? From my (admittedly limited) understanding,OPTIONAL
fields are omitted when they are blank.The text was updated successfully, but these errors were encountered: