I'm trying to build a decoder for the CMS structures specified in RFC 6268 (https://tools.ietf.org/html/rfc6268). So I download the RFC's .txt, I run examples/crfc2asn1.pl rfc6268.txt, then I run asn1c rfc6268-CryptographicMessageSyntax-2010.asn1, but the program chokes on line 6:
ASN.1 grammar parse error near line 6 (token "{"): syntax error, unexpected '{', expecting TOK_typereference or TOK_capitalreference
Cannot parse "rfc6268-CryptographicMessageSyntax-2010.asn1"
I'm using v0.9.24.
I'm trying to build a decoder for the CMS structures specified in RFC 6268 (https://tools.ietf.org/html/rfc6268). So I download the RFC's .txt, I run examples/crfc2asn1.pl rfc6268.txt, then I run asn1c rfc6268-CryptographicMessageSyntax-2010.asn1, but the program chokes on line 6:
ASN.1 grammar parse error near line 6 (token "{"): syntax error, unexpected '{', expecting TOK_typereference or TOK_capitalreference
Cannot parse "rfc6268-CryptographicMessageSyntax-2010.asn1"
The file looks like this:
Based on the examples I figured I'd try to add some name before '{' (like "CMS2010"). This time the program choked on double square brackets:
ASN.1 grammar parse error near line 126 (token "[["): syntax error, unexpected TOK_VBracketLeft
Cannot parse "rfc6268-CryptographicMessageSyntax-2010.asn1"
The file around line 126 looks like this:
What exactly am I supposed to do from here?
Thanks in advance.
Last edit: Kévin Le Gouguec 2014-05-02