1OPENSSL-FORMAT-OPTIONS(1ossl) OpenSSL OPENSSL-FORMAT-OPTIONS(1ossl)
2
3
4
6 openssl-format-options - OpenSSL command input and output format
7 options
8
10 openssl command [ options ... ] [ parameters ... ]
11
13 Several OpenSSL commands can take input or generate output in a variety
14 of formats.
15
16 Since OpenSSL 3.0 keys, single certificates, and CRLs can be read from
17 files in any of the DER, PEM or P12 formats. Specifying their input
18 format is no more needed and the openssl commands will automatically
19 try all the possible formats. However if the DER or PEM input format is
20 specified it will be enforced.
21
22 In order to access a key via an engine the input format ENGINE may be
23 used; alternatively the key identifier in the <uri> argument of the
24 respective key option may be preceded by "org.openssl.engine:". See
25 "Engine Options" in openssl(1) for an example usage of the latter.
26
28 Format Options
29 The options to specify the format are as follows. Refer to the
30 individual man page to see which options are accepted.
31
32 -inform format, -outform format
33 The format of the input or output streams.
34
35 -keyform format
36 Format of a private key input source.
37
38 -CRLform format
39 Format of a CRL input source.
40
41 Format Option Arguments
42 The possible format arguments are described below. Both uppercase and
43 lowercase are accepted.
44
45 The list of acceptable format arguments, and the default, is described
46 in each command documentation.
47
48 DER A binary format, encoded or parsed according to Distinguished
49 Encoding Rules (DER) of the ASN.1 data language.
50
51 ENGINE
52 Used to specify that the cryptographic material is in an OpenSSL
53 engine. An engine must be configured or specified using the
54 -engine option. A password or PIN may be supplied to the engine
55 using the -passin option.
56
57 P12 A DER-encoded file containing a PKCS#12 object. It might be
58 necessary to provide a decryption password to retrieve the private
59 key.
60
61 PEM A text format defined in IETF RFC 1421 and IETF RFC 7468. Briefly,
62 this is a block of base-64 encoding (defined in IETF RFC 4648),
63 with specific lines used to mark the start and end:
64
65 Text before the BEGIN line is ignored.
66 ----- BEGIN object-type -----
67 OT43gQKBgQC/2OHZoko6iRlNOAQ/tMVFNq7fL81GivoQ9F1U0Qr+DH3ZfaH8eIkX
68 xT0ToMPJUzWAn8pZv0snA0um6SIgvkCuxO84OkANCVbttzXImIsL7pFzfcwV/ERK
69 UM6j0ZuSMFOCr/lGPAoOQU0fskidGEHi1/kW+suSr28TqsyYZpwBDQ==
70 ----- END object-type -----
71 Text after the END line is also ignored
72
73 The object-type must match the type of object that is expected.
74 For example a "BEGIN X509 CERTIFICATE" will not match if the
75 command is trying to read a private key. The types supported
76 include:
77
78 ANY PRIVATE KEY
79 CERTIFICATE
80 CERTIFICATE REQUEST
81 CMS
82 DH PARAMETERS
83 DSA PARAMETERS
84 DSA PUBLIC KEY
85 EC PARAMETERS
86 EC PRIVATE KEY
87 ECDSA PUBLIC KEY
88 ENCRYPTED PRIVATE KEY
89 PARAMETERS
90 PKCS #7 SIGNED DATA
91 PKCS7
92 PRIVATE KEY
93 PUBLIC KEY
94 RSA PRIVATE KEY
95 SSL SESSION PARAMETERS
96 TRUSTED CERTIFICATE
97 X509 CRL
98 X9.42 DH PARAMETERS
99
100 The following legacy object-type's are also supported for
101 compatibility with earlier releases:
102
103 DSA PRIVATE KEY
104 NEW CERTIFICATE REQUEST
105 RSA PUBLIC KEY
106 X509 CERTIFICATE
107
108 SMIME
109 An S/MIME object as described in IETF RFC 8551. Earlier versions
110 were known as CMS and are compatible. Note that the parsing is
111 simple and might fail to parse some legal data.
112
114 Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
115
116 Licensed under the Apache License 2.0 (the "License"). You may not use
117 this file except in compliance with the License. You can obtain a copy
118 in the file LICENSE in the source distribution or at
119 <https://www.openssl.org/source/license.html>.
120
121
122
1233.0.5 2022-11-01 OPENSSL-FORMAT-OPTIONS(1ossl)