kimgr / asn1ate

A Python library for translating ASN.1 into other forms.
Other
69 stars 41 forks source link

OBJECT IDENTIFIER Error #36

Closed Mourhamo closed 5 years ago

Mourhamo commented 8 years ago

Hi,

I have a issue in case of an OBJECT IDENTIFIER define with two args: OBJECT IDENTIFIER (id-qt-cps | id-qt-unotice)

i think the character | is not handeled

find the ANS1 line 92

Thanks for help :) PKIX1Implicit88.asn1.txt

kimgr commented 8 years ago

I think this is another example of constraint syntax -- the pipe character is not related to OBJECT IDENTIFIER but helps represent a constrained OBJECT IDENTIFIER type:

PolicyQualifierId ::= OBJECT IDENTIFIER ( 1 | 0 )

A PolicyQualifierId in this example, thus, can only hold the values OBJECT IDENTIFIER { 1 } or OBJECT IDENTIFIER { 0 }.

I've made several attempts at handling constraint syntax better, but I haven't found anything that works well yet.

kimgr commented 5 years ago

This is now implemented on master.