Closed JNevrly closed 4 years ago
I did not check in details what happens in pycrate ; but maybe it would be nice to tell people writing the ITS ASN.1 specs to do some efforts in making less convoluted definitions...
Using ASN.1 only for ITS-related work, I have no comparison. I do agree the definitions are extremely convoluted from absolute point of view, but I kinda thought other areas where ASN.1 is used suffers from the same sort of abstraction creep... :roll_eyes:
Last commit https://github.com/P1sec/pycrate/commit/d079b1841f93a2fffe95e4d57415bfe553acd003 should solve the issue. Every value exclusion is ignored by the code generator.
I can confirm it fixes the issue. Thanks a lot for a quick fix! Unfortunately, another issue (#109) popped up regarding the same BitString construct...
Using constraint
ALL EXCEPT {}
, such as (taken from ITS security spec):Results in setting
_cons_val = ASN1Set(root=[(0, 0)], ext=None)
, which does not seem correct. As a result, correct values cannot be set, causing validation errorn on AsnObj level:Unlike issues #65, #66, this seems to me more like a compiler/generator problem than a runtime problem (thus much harder to understand ;)).