1OPENSSL-PKCS7(1ossl) OpenSSL OPENSSL-PKCS7(1ossl)
2
3
4
6 openssl-pkcs7 - PKCS#7 command
7
9 openssl pkcs7 [-help] [-inform DER|PEM] [-outform DER|PEM] [-in
10 filename] [-out filename] [-print] [-print_certs] [-text] [-noout]
11 [-engine id] [-provider name] [-provider-path path] [-propquery propq]
12
14 This command processes PKCS#7 files. Note that it only understands
15 PKCS#7 v 1.5 as specified in IETF RFC 2315. It cannot currently parse
16 CMS as described in IETF RFC 2630.
17
19 -help
20 Print out a usage message.
21
22 -inform DER|PEM, -outform DER|PEM
23 The input and formats; the default is PEM. See
24 openssl-format-options(1) for details.
25
26 The data is a PKCS#7 Version 1.5 structure.
27
28 -in filename
29 This specifies the input filename to read from or standard input if
30 this option is not specified.
31
32 -out filename
33 Specifies the output filename to write to or standard output by
34 default.
35
36 -print
37 Print out the full PKCS7 object.
38
39 -print_certs
40 Prints out any certificates or CRLs contained in the file. They are
41 preceded by their subject and issuer names in one line format.
42
43 -text
44 Prints out certificate details in full rather than just subject and
45 issuer names.
46
47 -noout
48 Don't output the encoded version of the PKCS#7 structure (or
49 certificates if -print_certs is set).
50
51 -engine id
52 See "Engine Options" in openssl(1). This option is deprecated.
53
54 -provider name
55 -provider-path path
56 -propquery propq
57 See "Provider Options" in openssl(1), provider(7), and property(7).
58
60 Convert a PKCS#7 file from PEM to DER:
61
62 openssl pkcs7 -in file.pem -outform DER -out file.der
63
64 Output all certificates in a file:
65
66 openssl pkcs7 -in file.pem -print_certs -out certs.pem
67
69 openssl(1), openssl-crl2pkcs7(1)
70
72 The -engine option was deprecated in OpenSSL 3.0.
73
75 Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
76
77 Licensed under the Apache License 2.0 (the "License"). You may not use
78 this file except in compliance with the License. You can obtain a copy
79 in the file LICENSE in the source distribution or at
80 <https://www.openssl.org/source/license.html>.
81
82
83
843.0.9 2023-07-27 OPENSSL-PKCS7(1ossl)