kimgr / asn1ate

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

Support for CLASS ... WITH SYNTAX ... #46

Open vanrein opened 8 years ago

vanrein commented 8 years ago

(feature request) This construct is popping up in RFCs and other specifications to an increasing degree. It would be splendid to have it added to asn1ate, and then also to asn2quickder.

kimgr commented 8 years ago

I looked up CLASS ... WITH SYNTAX ... in my ASN.1 specifications, and I frankly could not make sense of them. Do you have a link to somewhere I can read more about the semantics? Thanks!

vanrein commented 8 years ago

Hi Kim,

I was also confused, but then I find this as a coherent explanation:

http://www.oss.com/asn1/resources/asn1-made-simple/advanced-topics.html

Especially "Information Objects" and "Open Types". What they say is that there's a table describing instance values.

I've seen it used in RFCs with &Id / &Type pairs to replace earlier versions using ANY DEFINED BY (oidfield), which would assume that a table is defined to work out what OID belongs to what type in the ANY field.

-Rick

kimgr commented 8 years ago

Aaaw, my head hurts! Thanks, that was a good example. I'll save it for a day when I'm feeling perkier to think about whether it's implementable.

dgudtsov commented 7 years ago

Hi! is there any progress with this issue? I have one sample having the same issue. Other online validators works well with this sample, but asn1ate says pyparsing.ParseException: Expected "END". I can also provide you an example if you need it...

vanrein commented 7 years ago

I found asn1ate fairly straightforward to get into, as it is programmed really cleanly. I can only suggest that you consider adding this to the code and offering it as a PR. It's what we did for Quick DER, for imports. (I am not kimgr, so I have no say of what comes in of course, but I'd like this in Quick DER as well.)

http://github.com/vanrein/quick-der

kimgr commented 7 years ago

Sorry, time has been scarce for asn1ate. I'll try to get to this, but I can't promise when.