diff options
Diffstat (limited to 'secure/usr.bin/openssl/man/asn1parse.1')
-rw-r--r-- | secure/usr.bin/openssl/man/asn1parse.1 | 62 |
1 files changed, 59 insertions, 3 deletions
diff --git a/secure/usr.bin/openssl/man/asn1parse.1 b/secure/usr.bin/openssl/man/asn1parse.1 index d1a81e8..f9cabea 100644 --- a/secure/usr.bin/openssl/man/asn1parse.1 +++ b/secure/usr.bin/openssl/man/asn1parse.1 @@ -1,4 +1,4 @@ -.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14 +.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32 .\" .\" Standard preamble: .\" ======================================================================== @@ -129,7 +129,7 @@ .\" ======================================================================== .\" .IX Title "ASN1PARSE 1" -.TH ASN1PARSE 1 "2005-02-25" "0.9.7d" "OpenSSL" +.TH ASN1PARSE 1 "2006-07-29" "0.9.8b" "OpenSSL" .SH "NAME" asn1parse \- ASN.1 parsing tool .SH "SYNOPSIS" @@ -144,6 +144,8 @@ asn1parse \- ASN.1 parsing tool [\fB\-i\fR] [\fB\-oid filename\fR] [\fB\-strparse offset\fR] +[\fB\-genstr string\fR] +[\fB\-genconf file\fR] .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBasn1parse\fR command is a diagnostic utility that can parse \s-1ASN\s0.1 @@ -182,6 +184,14 @@ file is described in the \s-1NOTES\s0 section below. .IX Item "-strparse offset" parse the contents octets of the \s-1ASN\s0.1 object starting at \fBoffset\fR. This option can be used multiple times to \*(L"drill down\*(R" into a nested structure. +.IP "\fB\-genstr string\fR, \fB\-genconf file\fR" 4 +.IX Item "-genstr string, -genconf file" +generate encoded data based on \fBstring\fR, \fBfile\fR or both using +\&\fIASN1_generate_nconf()\fR format. If \fBfile\fR only is present then the string +is obtained from the default section using the name \fBasn1\fR. The encoded +data is passed through the \s-1ASN1\s0 parser and printed out as though it came +from a file, the contents can thus be examined and written to a file +using the \fBout\fR option. .Sh "\s-1OUTPUT\s0" .IX Subsection "OUTPUT" The output will typically contain lines like this: @@ -237,7 +247,53 @@ by white space. The final column is the rest of the line and is the \&\*(L"long name\*(R". \fBasn1parse\fR displays the long name. Example: .PP \&\f(CW\*(C`1.2.3.4 shortName A long name\*(C'\fR +.SH "EXAMPLES" +.IX Header "EXAMPLES" +Parse a file: +.PP +.Vb 1 +\& openssl asn1parse -in file.pem +.Ve +.PP +Parse a \s-1DER\s0 file: +.PP +.Vb 1 +\& openssl asn1parse -inform DER -in file.der +.Ve +.PP +Generate a simple UTF8String: +.PP +.Vb 1 +\& openssl asn1parse -genstr 'UTF8:Hello World' +.Ve +.PP +Generate and write out a UTF8String, don't print parsed output: +.PP +.Vb 1 +\& openssl asn1parse -genstr 'UTF8:Hello World' -noout -out utf8.der +.Ve +.PP +Generate using a config file: +.PP +.Vb 1 +\& openssl asn1parse -genconf asn1.cnf -noout -out asn1.der +.Ve +.PP +Example config file: +.PP +.Vb 1 +\& asn1=SEQUENCE:seq_sect +.Ve +.PP +.Vb 1 +\& [seq_sect] +.Ve +.PP +.Vb 2 +\& field1=BOOL:TRUE +\& field2=EXP:0, UTF8:some random string +.Ve .SH "BUGS" .IX Header "BUGS" -There should be options to change the format of input lines. The output of some +There should be options to change the format of output lines. The output of some \&\s-1ASN\s0.1 types is not well handled (if at all). |