X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=doc%2Fapps%2Fasn1parse.pod;h=542d9690662685f6d5d6007c2fccf222274f7a49;hb=9e7459fc5d90038dd798f5dff4a1f455acb458e2;hp=e76e9813abaf48fca86a1a0850cef0fe5b0cce60;hpb=dd46d58f65bd3a342bbcd8586680942be643fc7d;p=oweals%2Fopenssl.git diff --git a/doc/apps/asn1parse.pod b/doc/apps/asn1parse.pod index e76e9813ab..542d969066 100644 --- a/doc/apps/asn1parse.pod +++ b/doc/apps/asn1parse.pod @@ -16,6 +16,8 @@ B B [B<-i>] [B<-oid filename>] [B<-strparse offset>] +[B<-genstr string>] +[B<-genconf file>] =head1 DESCRIPTION @@ -67,6 +69,14 @@ file is described in the NOTES section below. parse the contents octets of the ASN.1 object starting at B. This option can be used multiple times to "drill down" into a nested structure. +=item B<-genstr string>, B<-genconf file> + +generate encoded data based on B, B or both using +ASN1_generate_nconf() format. If B only is present then the string +is obtained from the default section using the name B. The encoded +data is passed through the ASN1 parser and printed out as though it came +from a file, the contents can thus be examined and written to a file +using the B option. =back @@ -121,9 +131,41 @@ by white space. The final column is the rest of the line and is the C<1.2.3.4 shortName A long name> +=head1 EXAMPLES + +Parse a file: + + openssl asn1parse -in file.pem + +Parse a DER file: + + openssl asn1parse -inform DER -in file.der + +Generate a simple UTF8String: + + openssl asn1parse -genstr 'UTF8:Hello World' + +Generate and write out a UTF8String, don't print parsed output: + + openssl asn1parse -genstr 'UTF8:Hello World' -noout -out utf8.der + +Generate using a config file: + + openssl asn1parse -genconf asn1.cnf -noout -out asn1.der + +Example config file: + + asn1=SEQUENCE:seq_sect + + [seq_sect] + + field1=BOOL:TRUE + field2=EXP:0, UTF8:some random string + + =head1 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 ASN.1 types is not well handled (if at all). =cut