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