b21feeea5f82809e87e3817da7ea16709dda8737
[openssl.git] / doc / man1 / openssl-pkcs7.pod
1 =pod
2
3 =head1 NAME
4
5 openssl-pkcs7 - PKCS#7 utility
6
7 =head1 SYNOPSIS
8
9 B<openssl> B<pkcs7>
10 [B<-help>]
11 [B<-inform> B<DER>|B<PEM>]
12 [B<-outform> B<DER>|B<PEM>]
13 [B<-in> I<filename>]
14 [B<-out> I<filename>]
15 [B<-print_certs>]
16 [B<-text>]
17 [B<-noout>]
18 [B<-engine> I<id>]
19
20 =for comment ifdef engine
21
22 =head1 DESCRIPTION
23
24 This command processes PKCS#7 files in DER or PEM format.
25
26 =head1 OPTIONS
27
28 =over 4
29
30 =item B<-help>
31
32 Print out a usage message.
33
34 =item B<-inform> B<DER>|B<PEM>
35
36 This specifies the input format. B<DER> format is DER encoded PKCS#7
37 v1.5 structure.B<PEM> (the default) is a base64 encoded version of
38 the DER form with header and footer lines.
39
40 =item B<-outform> B<DER>|B<PEM>
41
42 This specifies the output format, the options have the same meaning and default
43 as the B<-inform> option.
44
45 =item B<-in> I<filename>
46
47 This specifies the input filename to read from or standard input if this
48 option is not specified.
49
50 =item B<-out> I<filename>
51
52 Specifies the output filename to write to or standard output by
53 default.
54
55 =item B<-print_certs>
56
57 Prints out any certificates or CRLs contained in the file. They are
58 preceded by their subject and issuer names in one line format.
59
60 =item B<-text>
61
62 Prints out certificates details in full rather than just subject and
63 issuer names.
64
65 =item B<-noout>
66
67 Don't output the encoded version of the PKCS#7 structure (or certificates
68 is B<-print_certs> is set).
69
70 =item B<-engine> I<id>
71
72 Specifying an engine (by its unique I<id> string) will cause this command
73 to attempt to obtain a functional reference to the specified engine,
74 thus initialising it if needed. The engine will then be set as the default
75 for all available algorithms.
76
77 =back
78
79 =head1 EXAMPLES
80
81 Convert a PKCS#7 file from PEM to DER:
82
83  openssl pkcs7 -in file.pem -outform DER -out file.der
84
85 Output all certificates in a file:
86
87  openssl pkcs7 -in file.pem -print_certs -out certs.pem
88
89 =head1 NOTES
90
91 The PEM PKCS#7 format uses the header and footer lines:
92
93  -----BEGIN PKCS7-----
94  -----END PKCS7-----
95
96 For compatibility with some CAs it will also accept:
97
98  -----BEGIN CERTIFICATE-----
99  -----END CERTIFICATE-----
100
101 =head1 RESTRICTIONS
102
103 There is no option to print out all the fields of a PKCS#7 file.
104
105 This PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC2315 they
106 cannot currently parse, for example, the new CMS as described in RFC2630.
107
108 =head1 SEE ALSO
109
110 L<openssl(1)>,
111 L<openssl-crl2pkcs7(1)>
112
113 =head1 COPYRIGHT
114
115 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
116
117 Licensed under the Apache License 2.0 (the "License").  You may not use
118 this file except in compliance with the License.  You can obtain a copy
119 in the file LICENSE in the source distribution or at
120 L<https://www.openssl.org/source/license.html>.
121
122 =cut