]>
Commit | Line | Data |
---|---|---|
5e76807b DSH |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
b6b66573 | 5 | openssl-pkcs7 - PKCS#7 utility |
5e76807b DSH |
6 | |
7 | =head1 SYNOPSIS | |
8 | ||
9 | B<openssl> B<pkcs7> | |
169394d4 | 10 | [B<-help>] |
e8769719 RS |
11 | [B<-inform> B<DER>|B<PEM>] |
12 | [B<-outform> B<DER>|B<PEM>] | |
13 | [B<-in> I<filename>] | |
14 | [B<-out> I<filename>] | |
5e76807b | 15 | [B<-print_certs>] |
01aad2c8 DSH |
16 | [B<-text>] |
17 | [B<-noout>] | |
e8769719 | 18 | [B<-engine> I<id>] |
5e76807b | 19 | |
9f3c076b | 20 | =for openssl ifdef engine |
1738c0ce | 21 | |
5e76807b DSH |
22 | =head1 DESCRIPTION |
23 | ||
35a810bb | 24 | This command processes PKCS#7 files in DER or PEM format. |
5e76807b | 25 | |
3dfda1a6 | 26 | =head1 OPTIONS |
5e76807b DSH |
27 | |
28 | =over 4 | |
29 | ||
169394d4 MR |
30 | =item B<-help> |
31 | ||
32 | Print out a usage message. | |
33 | ||
e8769719 | 34 | =item B<-inform> B<DER>|B<PEM> |
5e76807b DSH |
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 | ||
e8769719 | 40 | =item B<-outform> B<DER>|B<PEM> |
5e76807b | 41 | |
7477c83e TM |
42 | This specifies the output format, the options have the same meaning and default |
43 | as the B<-inform> option. | |
5e76807b | 44 | |
e8769719 | 45 | =item B<-in> I<filename> |
5e76807b DSH |
46 | |
47 | This specifies the input filename to read from or standard input if this | |
48 | option is not specified. | |
49 | ||
e8769719 | 50 | =item B<-out> I<filename> |
5e76807b | 51 | |
c4de074e | 52 | Specifies the output filename to write to or standard output by |
5e76807b DSH |
53 | default. |
54 | ||
55 | =item B<-print_certs> | |
56 | ||
c4de074e | 57 | Prints out any certificates or CRLs contained in the file. They are |
5e76807b DSH |
58 | preceded by their subject and issuer names in one line format. |
59 | ||
954ef7ef DSH |
60 | =item B<-text> |
61 | ||
c4de074e | 62 | Prints out certificates details in full rather than just subject and |
954ef7ef DSH |
63 | issuer names. |
64 | ||
65 | =item B<-noout> | |
66 | ||
c4de074e | 67 | Don't output the encoded version of the PKCS#7 structure (or certificates |
954ef7ef DSH |
68 | is B<-print_certs> is set). |
69 | ||
e8769719 | 70 | =item B<-engine> I<id> |
bfa35550 | 71 | |
35a810bb | 72 | Specifying an engine (by its unique I<id> string) will cause this command |
bfa35550 RL |
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 | ||
5e76807b DSH |
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 | ||
3142c86d DSH |
89 | =head1 NOTES |
90 | ||
91 | The PEM PKCS#7 format uses the header and footer lines: | |
92 | ||
93 | -----BEGIN PKCS7----- | |
94 | -----END PKCS7----- | |
95 | ||
3b80e3aa | 96 | For compatibility with some CAs it will also accept: |
3142c86d DSH |
97 | |
98 | -----BEGIN CERTIFICATE----- | |
99 | -----END CERTIFICATE----- | |
100 | ||
5e76807b DSH |
101 | =head1 RESTRICTIONS |
102 | ||
103 | There is no option to print out all the fields of a PKCS#7 file. | |
104 | ||
1bc74519 | 105 | This PKCS#7 routines only understand PKCS#7 v 1.5 as specified in RFC2315 they |
c4471290 | 106 | cannot currently parse, for example, the new CMS as described in RFC2630. |
5e76807b DSH |
107 | |
108 | =head1 SEE ALSO | |
109 | ||
b6b66573 DMSP |
110 | L<openssl(1)>, |
111 | L<openssl-crl2pkcs7(1)> | |
5e76807b | 112 | |
e2f92610 RS |
113 | =head1 COPYRIGHT |
114 | ||
b6b66573 | 115 | Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved. |
e2f92610 | 116 | |
449040b4 | 117 | Licensed under the Apache License 2.0 (the "License"). You may not use |
e2f92610 RS |
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 |