ffasn1dump compiles ASN.1 sources to memory and converts messages from one ASN.1 encoding to another. The supported encodings are BER/DER, aligned PER, unaligned PER, XER, OER and GSER (RFC 3641).
Because the XER or GSER encoding are human readable, it also allows easy editing of ASN.1 messages with a text editor.
ffasn1dump is a free demo of the FFASN1 compiler. This compiler generates efficient and small C code to encode or decode ASN.1 messages in all supported encodings.
No specific installation is needed. The executable ffasn1dump is self contained. On a unix system, you can copy it in /usr/local/bin for example.
Here are a few examples by using the source simpletest.asn from the examples directory:
ObjectListdefined in simpletest.asn from BER (file simpletest.der) to GSER (default output format is GSER to console, default input format is BER):
ffasn1dump simpletest.asn ObjectList simpletest.der
ffasn1dump -I uper simpletest.asn ObjectList simpletest.uper
ffasn1dump -I aper -O der simpletest.asn ObjectList simpletest.aper simpletest.der
ffasn1dump [options] asn1source [type infile [outfile]]
random is used, a valid ASN.1 message with random content is
generated. In this case, infile is a number used as seed by the
ffasn1dump supports the following standards: X.680, X.681, X.682, X.683, X.690, X.691, X.693, X.696 and RFC 3641.
ANY type from the older X.208 ASN.1 specification is also
ffasn1dump is copyright 2011-2015 Fabrice Bellard.
ffasn1dump is available free of charge, but its redistribution on any medium needs written consent of the author.
ffasn1dump is available without any express or implied warranty. In no event will the author be held liable for any damages arising from the use of this software.