Deleted Added
full compact
asn1parse.1 (206048) asn1parse.1 (215698)
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.37
1.\" Automatically generated by Pod::Man 2.22 (Pod::Simple 3.07)
2.\"
3.\" Standard preamble:
4.\" ========================================================================
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
5.de Sp \" Vertical space (when we can't use .PP)
6.if t .sp .5v
7.if n .sp
8..
9.de Vb \" Begin verbatim text
10.ft CW
11.nf
12.ne \\$1
13..
14.de Ve \" End verbatim text
15.ft R
16.fi
17..
18.\" Set up some character translations and predefined strings. \*(-- will
19.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
20.\" double quote, and \*(R" will give a right double quote. \*(C+ will
21.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23.\" nothing in troff, for use with C<>.
24.tr \(*W-
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
25.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26.ie n \{\
27. ds -- \(*W-
28. ds PI pi
29. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
31. ds L" ""
32. ds R" ""
33. ds C` ""
34. ds C' ""
35'br\}
36.el\{\
37. ds -- \|\(em\|
38. ds PI \(*p
39. ds L" ``
40. ds R" ''
41'br\}
42.\"
43.\" Escape single quotes in literal strings from groff's Unicode transform.
44.ie \n(.g .ds Aq \(aq
45.el .ds Aq '
46.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
47.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
48.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
49.\" entries marked with X<> in POD. Of course, you'll have to process the
50.\" output yourself in some meaningful fashion.
55.if \nF \{\
51.ie \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
52. de IX
53. tm Index:\\$1\t\\n%\t"\\$2"
54..
55. nr % 0
56. rr F
57.\}
58.el \{\
59. de IX
60..
61.\}
62.\"
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1

--- 48 unchanged lines hidden (view full) ---

124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "ASN1PARSE 1"
63.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
64.\" Fear. Run. Save yourself. No user-serviceable parts.
65. \" fudge factors for nroff and troff
66.if n \{\
67. ds #H 0
68. ds #V .8m
69. ds #F .3m
70. ds #[ \f1

--- 48 unchanged lines hidden (view full) ---

119. ds Th \o'LP'
120. ds ae ae
121. ds Ae AE
122.\}
123.rm #[ #] #H #V #F C
124.\" ========================================================================
125.\"
126.IX Title "ASN1PARSE 1"
132.TH ASN1PARSE 1 "2010-03-24" "0.9.8n" "OpenSSL"
127.TH ASN1PARSE 1 "2010-11-16" "0.9.8p" "OpenSSL"
128.\" For nroff, turn off justification. Always turn off hyphenation; it makes
129.\" way too many mistakes in technical documents.
130.if n .ad l
131.nh
133.SH "NAME"
134asn1parse \- ASN.1 parsing tool
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137\&\fBopenssl\fR \fBasn1parse\fR
138[\fB\-inform PEM|DER\fR]
139[\fB\-in filename\fR]
140[\fB\-out filename\fR]

--- 45 unchanged lines hidden (view full) ---

186option can be used multiple times to \*(L"drill down\*(R" into a nested structure.
187.IP "\fB\-genstr string\fR, \fB\-genconf file\fR" 4
188.IX Item "-genstr string, -genconf file"
189generate encoded data based on \fBstring\fR, \fBfile\fR or both using
190\&\fIASN1_generate_nconf()\fR format. If \fBfile\fR only is present then the string
191is obtained from the default section using the name \fBasn1\fR. The encoded
192data is passed through the \s-1ASN1\s0 parser and printed out as though it came
193from a file, the contents can thus be examined and written to a file
132.SH "NAME"
133asn1parse \- ASN.1 parsing tool
134.SH "SYNOPSIS"
135.IX Header "SYNOPSIS"
136\&\fBopenssl\fR \fBasn1parse\fR
137[\fB\-inform PEM|DER\fR]
138[\fB\-in filename\fR]
139[\fB\-out filename\fR]

--- 45 unchanged lines hidden (view full) ---

185option can be used multiple times to \*(L"drill down\*(R" into a nested structure.
186.IP "\fB\-genstr string\fR, \fB\-genconf file\fR" 4
187.IX Item "-genstr string, -genconf file"
188generate encoded data based on \fBstring\fR, \fBfile\fR or both using
189\&\fIASN1_generate_nconf()\fR format. If \fBfile\fR only is present then the string
190is obtained from the default section using the name \fBasn1\fR. The encoded
191data is passed through the \s-1ASN1\s0 parser and printed out as though it came
192from a file, the contents can thus be examined and written to a file
194using the \fBout\fR option.
195.Sh "\s-1OUTPUT\s0"
193using the \fBout\fR option.
194.SS "\s-1OUTPUT\s0"
196.IX Subsection "OUTPUT"
197The output will typically contain lines like this:
198.PP
199.Vb 1
200\& 0:d=0 hl=4 l= 681 cons: SEQUENCE
201.Ve
202.PP
203\&.....

--- 16 unchanged lines hidden (view full) ---

220This example is part of a self signed certificate. Each line starts with the
221offset in decimal. \fBd=XX\fR specifies the current depth. The depth is increased
222within the scope of any \s-1SET\s0 or \s-1SEQUENCE\s0. \fBhl=XX\fR gives the header length
223(tag and length octets) of the current type. \fBl=XX\fR gives the length of
224the contents octets.
225.PP
226The \fB\-i\fR option can be used to make the output more readable.
227.PP
195.IX Subsection "OUTPUT"
196The output will typically contain lines like this:
197.PP
198.Vb 1
199\& 0:d=0 hl=4 l= 681 cons: SEQUENCE
200.Ve
201.PP
202\&.....

--- 16 unchanged lines hidden (view full) ---

219This example is part of a self signed certificate. Each line starts with the
220offset in decimal. \fBd=XX\fR specifies the current depth. The depth is increased
221within the scope of any \s-1SET\s0 or \s-1SEQUENCE\s0. \fBhl=XX\fR gives the header length
222(tag and length octets) of the current type. \fBl=XX\fR gives the length of
223the contents octets.
224.PP
225The \fB\-i\fR option can be used to make the output more readable.
226.PP
228Some knowledge of the \s-1ASN\s0.1 structure is needed to interpret the output.
227Some knowledge of the \s-1ASN\s0.1 structure is needed to interpret the output.
229.PP
230In this example the \s-1BIT\s0 \s-1STRING\s0 at offset 229 is the certificate public key.
231The contents octets of this will contain the public key information. This can
232be examined using the option \fB\-strparse 229\fR to yield:
233.PP
234.Vb 3
235\& 0:d=0 hl=3 l= 137 cons: SEQUENCE
236\& 3:d=1 hl=3 l= 129 prim: INTEGER :E5D21E1F5C8D208EA7A2166C7FAF9F6BDF2059669C60876DDB70840F1A5AAFA59699FE471F379F1DD6A487E7D5409AB6A88D4A9746E24B91D8CF55DB3521015460C8EDE44EE8A4189F7A7BE77D6CD3A9AF2696F486855CF58BF0EDF2B4068058C7A947F52548DDF7E15E96B385F86422BEA9064A3EE9E1158A56E4A6F47E5897

--- 10 unchanged lines hidden (view full) ---

247\&\*(L"long name\*(R". \fBasn1parse\fR displays the long name. Example:
248.PP
249\&\f(CW\*(C`1.2.3.4 shortName A long name\*(C'\fR
250.SH "EXAMPLES"
251.IX Header "EXAMPLES"
252Parse a file:
253.PP
254.Vb 1
228.PP
229In this example the \s-1BIT\s0 \s-1STRING\s0 at offset 229 is the certificate public key.
230The contents octets of this will contain the public key information. This can
231be examined using the option \fB\-strparse 229\fR to yield:
232.PP
233.Vb 3
234\& 0:d=0 hl=3 l= 137 cons: SEQUENCE
235\& 3:d=1 hl=3 l= 129 prim: INTEGER :E5D21E1F5C8D208EA7A2166C7FAF9F6BDF2059669C60876DDB70840F1A5AAFA59699FE471F379F1DD6A487E7D5409AB6A88D4A9746E24B91D8CF55DB3521015460C8EDE44EE8A4189F7A7BE77D6CD3A9AF2696F486855CF58BF0EDF2B4068058C7A947F52548DDF7E15E96B385F86422BEA9064A3EE9E1158A56E4A6F47E5897

--- 10 unchanged lines hidden (view full) ---

246\&\*(L"long name\*(R". \fBasn1parse\fR displays the long name. Example:
247.PP
248\&\f(CW\*(C`1.2.3.4 shortName A long name\*(C'\fR
249.SH "EXAMPLES"
250.IX Header "EXAMPLES"
251Parse a file:
252.PP
253.Vb 1
255\& openssl asn1parse -in file.pem
254\& openssl asn1parse \-in file.pem
256.Ve
257.PP
258Parse a \s-1DER\s0 file:
259.PP
260.Vb 1
255.Ve
256.PP
257Parse a \s-1DER\s0 file:
258.PP
259.Vb 1
261\& openssl asn1parse -inform DER -in file.der
260\& openssl asn1parse \-inform DER \-in file.der
262.Ve
263.PP
264Generate a simple UTF8String:
265.PP
266.Vb 1
261.Ve
262.PP
263Generate a simple UTF8String:
264.PP
265.Vb 1
267\& openssl asn1parse -genstr 'UTF8:Hello World'
266\& openssl asn1parse \-genstr \*(AqUTF8:Hello World\*(Aq
268.Ve
269.PP
270Generate and write out a UTF8String, don't print parsed output:
271.PP
272.Vb 1
267.Ve
268.PP
269Generate and write out a UTF8String, don't print parsed output:
270.PP
271.Vb 1
273\& openssl asn1parse -genstr 'UTF8:Hello World' -noout -out utf8.der
272\& openssl asn1parse \-genstr \*(AqUTF8:Hello World\*(Aq \-noout \-out utf8.der
274.Ve
275.PP
276Generate using a config file:
277.PP
278.Vb 1
273.Ve
274.PP
275Generate using a config file:
276.PP
277.Vb 1
279\& openssl asn1parse -genconf asn1.cnf -noout -out asn1.der
278\& openssl asn1parse \-genconf asn1.cnf \-noout \-out asn1.der
280.Ve
281.PP
282Example config file:
283.PP
284.Vb 1
285\& asn1=SEQUENCE:seq_sect
279.Ve
280.PP
281Example config file:
282.PP
283.Vb 1
284\& asn1=SEQUENCE:seq_sect
286.Ve
287.PP
288.Vb 1
285\&
289\& [seq_sect]
286\& [seq_sect]
290.Ve
291.PP
292.Vb 2
287\&
293\& field1=BOOL:TRUE
294\& field2=EXP:0, UTF8:some random string
295.Ve
296.SH "BUGS"
297.IX Header "BUGS"
298There should be options to change the format of output lines. The output of some
299\&\s-1ASN\s0.1 types is not well handled (if at all).
288\& field1=BOOL:TRUE
289\& field2=EXP:0, UTF8:some random string
290.Ve
291.SH "BUGS"
292.IX Header "BUGS"
293There should be options to change the format of output lines. The output of some
294\&\s-1ASN\s0.1 types is not well handled (if at all).