summaryrefslogtreecommitdiff
path: root/doc/libtasn1.texi
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2011-10-25 15:55:19 +0200
committerSimon Josefsson <simon@josefsson.org>2011-10-25 15:55:19 +0200
commitd918833e7744a5cf79c85f3e13d22739b1b3690b (patch)
tree4550cbd260bd07076b8fb47fda604d98687ff982 /doc/libtasn1.texi
parentdcc598156e41efe6996f13d9842c76a68b8d46b2 (diff)
downloadlibtasn1-d918833e7744a5cf79c85f3e13d22739b1b3690b.tar.gz
libtasn1-d918833e7744a5cf79c85f3e13d22739b1b3690b.tar.bz2
libtasn1-d918833e7744a5cf79c85f3e13d22739b1b3690b.zip
libtasn1.texi: Add examples to asn1Coding and asn1Decoding tools.
Diffstat (limited to 'doc/libtasn1.texi')
-rw-r--r--doc/libtasn1.texi41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/libtasn1.texi b/doc/libtasn1.texi
index 3099b0f..84649ec 100644
--- a/doc/libtasn1.texi
+++ b/doc/libtasn1.texi
@@ -320,6 +320,39 @@ Options:
-o file : output file.
@end verbatim
+For example, consider a ASN.1 definitions file as follows:
+
+@verbatim
+PKIX1 { }
+
+DEFINITIONS IMPLICIT TAGS ::=
+
+BEGIN
+
+Dss-Sig-Value ::= SEQUENCE {
+ r INTEGER,
+ s INTEGER
+}
+
+END
+@end verbatim
+
+And a assignments file as follows:
+
+@verbatim
+dp PKIX1.Dss-Sig-Value
+
+r 42
+s 47
+@end verbatim
+
+Running the command below will generate a file @file{assign.out}
+containing the DER encoding of @code{PKIX1.Dss-Sig-Value}.
+
+@verbatim
+$ asn1Coding pkix.asn assign.asn1
+@end verbatim
+
@node Invoking asn1Decoding
@section Invoking asn1Decoding
@cindex asn1Decoding program
@@ -338,6 +371,14 @@ Options:
-o file : output file.
@end verbatim
+For example, after generating the file @file{assign.out} from the
+example section of the @code{asn1Coding} command, the following
+invocation will decode the DER data.
+
+@verbatim
+$ asn1Decoding pkix.asn assign.out PKIX1.Dss-Sig-Value
+@end verbatim
+
@node Function reference
@chapter Function reference