Re: [taste-users] asn1scc/tinyAsn1 and X.509

[ Thread Index | Date Index | More lists.tuxfamily.org/taste-users Archives ]


Dear Adrian,

I checked with the compiler development team. It appears that if you look at the latest version of the ASN.1 standard (which our compiler implements): http://www.itu.int/rec/T-REC-X.680-200811-I , you will not find this construct (ANY DEFINED BY).

It seems that it was an extension of an old, temporary standard (X208): 

The ITU-T site says the following:

CCITT Recommendation X.208 has been withdrawn on 30 October 2002 as it has been superseded by ITU-T Recommendations X.680-683. All known defects in X.208 have been corrected in ITU-T Recommendations X.680-683 (1993) further revised in 1997 and 2002. If you are a protocol designer creating new ASN.1 notation, you should use the 2002 version of ASN.1 as defined in ITU-T Recommendations X.680-X.683 (2002) instead of using CCITT Recommendation X.208. For further information, please see "Changing from ASN.1:1988 to ASN.1:2002" on the ITU-T Study Group 17 web page.

So I would not recommend to use this construct, even if it is supported by some tools.

Note that if you are interested in the Ada backend, a newer version of the compiler is available (but not officially released yet as we are still conducting some tests on it) that generates SPARK Ada code for the types, encoders and decoders. It has also more advanced capabilities for supporting legacy encoding formats and automatically generating test cases and documentation.

You may be interested in reading the following paper for more information:
http://taste.tuxfamily.org/wiki/index.php?title=File:Erts2012_submission_27_ASN1Compiler.pdf

Hope that helps,

Best regards,
Maxime Perrotin



--
ESA - European Space Agency

Maxime Perrotin
TASTE Project manager
PROBA V - PROBA 3 Software engineer

System, Software and Technology Department

ESTEC
Keplerlaan 1, PO Box 299
NL-2200 AG Noordiwjk, The Netherlands
maxime.perrotin@xxxxxxx | www.esa.int
+31 (0)71 565 4923 | Fax +31 (0)71 565 5420


On Thu, 27 Sep 2012 13:12:37 +0200, Adrian-Ken Rueegsegger <ken@xxxxxxxxxxx> wrote:

> Hello,
>
> First of I am not sure if this is the right place to ask for help. If
> not please, be so kind to point me to the correct mailing list or person.
>
> We are trying to compile the X.509 ASN.1 specification contained in RFC
> 5280, appendix A [1] using asn1scc downloaded from [2]. We extracted the
> ASN.1 specification from the RFC using the crfc2asn1.pl script from the
> asn1c project [3].
>
> We tried the following command to generate Ada code from the spec:
>
> $ mono asn1.exe -Ada rfc5280-PKIX1Explicit88.asn1
> File rfc5280-PKIX1Explicit88.asn1, line 446:33 missing R_BRACKET at
> 'DEFINED'
>
> The asn1c compiler is able to generate C code from the same
> specification without a problem.
>
> I also tried to generate Ada code from the RFC 3280 ASN.1 specification
> rfc3280-PKIX1Explicit88.asn1, which is part of the asn1scc source
> tarball [4] in the directory tinyAsn1/tc. A similar error is issued:
>
> $ mono asn1.exe -Ada rfc3280-PKIX1Explicit88.asn1
> File rfc3280-PKIX1Explicit88.asn1, line 351:33 missing R_BRACKET at
> 'DEFINED'
>
> It seems that the _expression_ "ANY DEFINED BY foo" is unknown to asn1scc,
> which leads to this error.
>
> Was asn1scc/tinyAsn1 able to successfully process this test case in the
> past?
>
> Thanks for your help.
>
> Best regards,
> Adrian
>
> [1] - http://tools.ietf.org/html/rfc5280
> [2] - http://www.semantix.gr/asn1scc/asn1Comp.tar.gz
> [3] - http://lionet.info/asn1c/blog/
> [4] - http://www.semantix.gr/asn1scc/asn1CompSrc.tar.gz
>
>

This message and any attachments are intended for the use of the addressee or addressees only. The unauthorised disclosure, use, dissemination or copying (either in whole or in part) of its content is not permitted. If you received this message in error, please notify the sender and delete it from your system. Emails can be altered and their integrity cannot be guaranteed by the sender.

Please consider the environment before printing this email.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/