You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I found a bug, where using the ALL EXCEPT constraint, is being handled, but inreverse as it should be.
This ASN.1 schema schould work:
Prototype DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Name ::= VisibleString (ALL EXCEPT ("Cat"))
firstName Name ::= "Notcat"
END
When I try to comile this, it raises "pycrate_asn1c.err.ASN1ObjErr: Prototype.firstName: internal object 0, value outside of the constraint" this errormessage.
When I change the schema to:
Prototype DEFINITIONS AUTOMATIC TAGS ::= BEGIN
Name ::= VisibleString (ALL EXCEPT ("Cat"))
firstName Name ::= "Cat"
END
It compiles and even serilizes the data. Should't the ALL EXCEPT allow everything else but "Cat" in this case?
If you need more information on this, I'll gladly try to help.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. This looks like a bug in the compiler. Such an exclusive constraint is not transposed to the compiled Python module, as this is not a visible constraint (it has no impact on the encoding). I will check where exactly things should be fixed in the compiler, starting here:
A fix has been introduced in the ASN.1 compiler, to verify values provided in ASN.1 schema: see b71bfee
But the support in the ASN.1 runtime for exclusive values is still missing. A corresponding issue has been opened here: #28
Hello,
I found a bug, where using the ALL EXCEPT constraint, is being handled, but inreverse as it should be.
This ASN.1 schema schould work:
When I try to comile this, it raises "pycrate_asn1c.err.ASN1ObjErr: Prototype.firstName: internal object 0, value outside of the constraint" this errormessage.
When I change the schema to:
It compiles and even serilizes the data. Should't the ALL EXCEPT allow everything else but "Cat" in this case?
If you need more information on this, I'll gladly try to help.
The text was updated successfully, but these errors were encountered: