adfe54ec0eac61656261a08cffe08fe04b97a3fd
[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 openssl ifdef engine
21
22 =head1 DESCRIPTION
23
24 This command processes PKCS#7 files.  Note that it only understands PKCS#7
25 v 1.5 as specified in IETF RFC 2315.  It cannot currently parse CMS as
26 described in IETF RFC 2630.
27
28 There is no option to print out all the fields of a PKCS#7 file.
29
30 =head1 OPTIONS
31
32 =over 4
33
34 =item B<-help>
35
36 Print out a usage message.
37
38 =item B<-inform> B<DER>|B<PEM>, B<-outform> B<DER>|B<PEM>
39
40 The input and formats; the default is B<PEM>.
41 See L<openssl(1)/Format Options> for details.
42
43 The data is a PKCS#7 Version 1.5 structure.
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 SEE ALSO
90
91 L<openssl(1)>,
92 L<openssl-crl2pkcs7(1)>
93
94 =head1 COPYRIGHT
95
96 Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
97
98 Licensed under the Apache License 2.0 (the "License").  You may not use
99 this file except in compliance with the License.  You can obtain a copy
100 in the file LICENSE in the source distribution or at
101 L<https://www.openssl.org/source/license.html>.
102
103 =cut