xref: /openssl/doc/man1/openssl-pkcs7.pod.in (revision fecb3aae)
1=pod
2
3=begin comment
4{- join("\n", @autowarntext) -}
5
6=end comment
7
8=head1 NAME
9
10openssl-pkcs7 - PKCS#7 command
11
12=head1 SYNOPSIS
13
14B<openssl> B<pkcs7>
15[B<-help>]
16[B<-inform> B<DER>|B<PEM>]
17[B<-outform> B<DER>|B<PEM>]
18[B<-in> I<filename>]
19[B<-out> I<filename>]
20[B<-print>]
21[B<-print_certs>]
22[B<-quiet>]
23[B<-text>]
24[B<-noout>]
25{- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_provider_synopsis -}
26
27=head1 DESCRIPTION
28
29This command processes PKCS#7 files.  Note that it only understands PKCS#7
30v 1.5 as specified in IETF RFC 2315.  It cannot currently parse CMS as
31described in IETF RFC 2630.
32
33=head1 OPTIONS
34
35=over 4
36
37=item B<-help>
38
39Print out a usage message.
40
41=item B<-inform> B<DER>|B<PEM>, B<-outform> B<DER>|B<PEM>
42
43The input and formats; the default is B<PEM>.
44See L<openssl-format-options(1)> for details.
45
46The data is a PKCS#7 Version 1.5 structure.
47
48=item B<-in> I<filename>
49
50This specifies the input filename to read from or standard input if this
51option is not specified.
52
53=item B<-out> I<filename>
54
55Specifies the output filename to write to or standard output by
56default.
57
58=item B<-print>
59
60Print out the full PKCS7 object.
61
62=item B<-print_certs>
63
64Prints out any certificates or CRLs contained in the file. They are
65preceded by their subject and issuer names in one line format.
66
67=item B<-quiet>
68
69When used with -print_certs, prints out just the PEM-encoded
70certificates without any other output.
71
72=item B<-text>
73
74Prints out certificate details in full rather than just subject and
75issuer names.
76
77=item B<-noout>
78
79Don't output the encoded version of the PKCS#7 structure (or certificates
80if B<-print_certs> is set).
81
82{- $OpenSSL::safe::opt_engine_item -}
83
84{- $OpenSSL::safe::opt_provider_item -}
85
86=back
87
88=head1 EXAMPLES
89
90Convert a PKCS#7 file from PEM to DER:
91
92 openssl pkcs7 -in file.pem -outform DER -out file.der
93
94Output all certificates in a file:
95
96 openssl pkcs7 -in file.pem -print_certs -out certs.pem
97
98=head1 SEE ALSO
99
100L<openssl(1)>,
101L<openssl-crl2pkcs7(1)>
102
103=head1 HISTORY
104
105The B<-engine> option was deprecated in OpenSSL 3.0.
106
107=head1 COPYRIGHT
108
109Copyright 2000-2022 The OpenSSL Project Authors. All Rights Reserved.
110
111Licensed under the Apache License 2.0 (the "License").  You may not use
112this file except in compliance with the License.  You can obtain a copy
113in the file LICENSE in the source distribution or at
114L<https://www.openssl.org/source/license.html>.
115
116=cut
117