Closed 6d7a closed 1 year ago
I also added the encode_default_with_constraints
that is invoked in macros/src/config.rs:876
.
Thank you for your PR and congrats on your first contribution! I thought I had done this but I realised I mostly focused on constraints through the type system.
I ran into a problem with constrained extension additions the other day. I represented the following ASN1 snippet...
...using rasn as...
...and discovered that an encoding-decoding round trip fails. I did some digging and it turned out that the decoder does not take constraints into account when dealing with extension additions. This PR provides the test case above and should fix the issue. The crucial fix is in the extension addition function of the per-decoder in
src/per/de.rs
, where I am passing along constraint information.