1=pod 2 3=head1 NAME 4 5pkcs7 - PKCS#7 utility 6 7=head1 SYNOPSIS 8 9B<openssl> B<pkcs7> 10[B<-inform PEM|DER>] 11[B<-outform PEM|DER>] 12[B<-in filename>] 13[B<-out filename>] 14[B<-print_certs>] 15[B<-text>] 16[B<-noout>] 17[B<-engine id>] 18 19=head1 DESCRIPTION 20 21The B<pkcs7> command processes PKCS#7 files in DER or PEM format. 22 23=head1 COMMAND OPTIONS 24 25=over 4 26 27=item B<-inform DER|PEM> 28 29This specifies the input format. B<DER> format is DER encoded PKCS#7 30v1.5 structure.B<PEM> (the default) is a base64 encoded version of 31the DER form with header and footer lines. 32 33=item B<-outform DER|PEM> 34 35This specifies the output format, the options have the same meaning as the 36B<-inform> option. 37 38=item B<-in filename> 39 40This specifies the input filename to read from or standard input if this 41option is not specified. 42 43=item B<-out filename> 44 45specifies the output filename to write to or standard output by 46default. 47 48=item B<-print_certs> 49 50prints out any certificates or CRLs contained in the file. They are 51preceded by their subject and issuer names in one line format. 52 53=item B<-text> 54 55prints out certificates details in full rather than just subject and 56issuer names. 57 58=item B<-noout> 59 60don't output the encoded version of the PKCS#7 structure (or certificates 61is B<-print_certs> is set). 62 63=item B<-engine id> 64 65specifying an engine (by it's unique B<id> string) will cause B<req> 66to attempt to obtain a functional reference to the specified engine, 67thus initialising it if needed. The engine will then be set as the default 68for all available algorithms. 69 70=back 71 72=head1 EXAMPLES 73 74Convert a PKCS#7 file from PEM to DER: 75 76 openssl pkcs7 -in file.pem -outform DER -out file.der 77 78Output all certificates in a file: 79 80 openssl pkcs7 -in file.pem -print_certs -out certs.pem 81 82=head1 NOTES 83 84The PEM PKCS#7 format uses the header and footer lines: 85 86 -----BEGIN PKCS7----- 87 -----END PKCS7----- 88 89For compatibility with some CAs it will also accept: 90 91 -----BEGIN CERTIFICATE----- 92 -----END CERTIFICATE----- 93 94=head1 RESTRICTIONS 95 96There is no option to print out all the fields of a PKCS#7 file. 97 98This PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC2315 they 99cannot currently parse, for example, the new CMS as described in RFC2630. 100 101=head1 SEE ALSO 102 103L<crl2pkcs7(1)|crl2pkcs7(1)> 104 105=cut 106