Debian Codegraph @

upstream/debian-unstable/man1/openssl-format-options.1ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "OPENSSL-FORMAT-OPTIONS 1SSL"
58 .TH OPENSSL-FORMAT-OPTIONS 1SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 openssl\-format\-options \- OpenSSL command input and output format options
65 .SH SYNOPSIS
66 .IX Header "SYNOPSIS"
67 \&\fBopenssl\fR
68 \&\fIcommand\fR
69 [ \fIoptions\fR ... ]
70 [ \fIparameters\fR ... ]
71 .SH DESCRIPTION
72 .IX Header "DESCRIPTION"
73 Several OpenSSL commands can take input or generate output in a variety
74 of formats.
75 .PP
76 Since OpenSSL 3.0 keys, single certificates, and CRLs can be read from
77 files in any of the \fBDER\fR, \fBPEM\fR or \fBP12\fR formats. Specifying their input
78 format is no more needed and the openssl commands will automatically try all
79 the possible formats. However if the \fBDER\fR or \fBPEM\fR input format is specified
80 it will be enforced.
81 .PP
82 In order to access a key via an engine the input format \fBENGINE\fR may be used;
83 alternatively the key identifier in the <uri> argument of the respective key
84 option may be preceded by \f(CW\*(C`org.openssl.engine:\*(C'\fR.
85 See "Engine Options" in \fBopenssl\fR\|(1) for an example usage of the latter.
86 .SH OPTIONS
87 .IX Header "OPTIONS"
88 .SS "Format Options"
89 .IX Subsection "Format Options"
90 The options to specify the format are as follows.
91 Refer to the individual man page to see which options are accepted.
92 .IP "\fB\-inform\fR \fIformat\fR, \fB\-outform\fR \fIformat\fR" 4
93 .IX Item "-inform format, -outform format"
94 The format of the input or output streams.
95 .IP "\fB\-keyform\fR \fIformat\fR" 4
96 .IX Item "-keyform format"
97 Format of a private key input source.
98 .IP "\fB\-CRLform\fR \fIformat\fR" 4
99 .IX Item "-CRLform format"
100 Format of a CRL input source.
101 .SS "Format Option Arguments"
102 .IX Subsection "Format Option Arguments"
103 The possible format arguments are described below.
104 Both uppercase and lowercase are accepted.
105 .PP
106 The list of acceptable format arguments, and the default,
107 is described in each command documentation.
108 .IP \fBDER\fR 4
109 .IX Item "DER"
110 A binary format, encoded or parsed according to Distinguished Encoding Rules
111 (DER) of the ASN.1 data language.
112 .IP \fBENGINE\fR 4
113 .IX Item "ENGINE"
114 Used to specify that the cryptographic material is in an OpenSSL \fBengine\fR.
115 An engine must be configured or specified using the \fB\-engine\fR option.
116 A password or PIN may be supplied to the engine using the \fB\-passin\fR option.
117 .IP \fBP12\fR 4
118 .IX Item "P12"
119 A DER-encoded file containing a PKCS#12 object.
120 It might be necessary to provide a decryption password to retrieve
121 the private key or certificate.
122 .IP \fBPEM\fR 4
123 .IX Item "PEM"
124 A text format defined in IETF RFC 1421 and IETF RFC 7468. Briefly, this is
125 a block of base\-64 encoding (defined in IETF RFC 4648), with specific
126 lines used to mark the start and end:
127 .Sp
128 .Vb 7
129 \& Text before the BEGIN line is ignored.
130 \& \-\-\-\-\- BEGIN object\-type \-\-\-\-\-
131 \& OT43gQKBgQC/2OHZoko6iRlNOAQ/tMVFNq7fL81GivoQ9F1U0Qr+DH3ZfaH8eIkX
132 \& xT0ToMPJUzWAn8pZv0snA0um6SIgvkCuxO84OkANCVbttzXImIsL7pFzfcwV/ERK
133 \& UM6j0ZuSMFOCr/lGPAoOQU0fskidGEHi1/kW+suSr28TqsyYZpwBDQ==
134 \& \-\-\-\-\- END object\-type \-\-\-\-\-
135 \& Text after the END line is also ignored
136 .Ve
137 .Sp
138 The \fIobject-type\fR must match the type of object that is expected.
139 For example a \f(CW\*(C`BEGIN X509 CERTIFICATE\*(C'\fR will not match if the command
140 is trying to read a private key. The types supported include:
141 .Sp
142 .Vb 10
143 \& ANY PRIVATE KEY
144 \& CERTIFICATE
145 \& CERTIFICATE REQUEST
146 \& CMS
147 \& DH PARAMETERS
148 \& DSA PARAMETERS
149 \& DSA PUBLIC KEY
150 \& EC PARAMETERS
151 \& EC PRIVATE KEY
152 \& ECDSA PUBLIC KEY
153 \& ENCRYPTED PRIVATE KEY
154 \& PARAMETERS
155 \& PKCS #7 SIGNED DATA
156 \& PKCS7
157 \& PRIVATE KEY
158 \& PUBLIC KEY
159 \& RSA PRIVATE KEY
160 \& SSL SESSION PARAMETERS
161 \& TRUSTED CERTIFICATE
162 \& X509 CRL
163 \& X9.42 DH PARAMETERS
164 .Ve
165 .Sp
166 The following legacy \fIobject-type\fR's are also supported for compatibility
167 with earlier releases:
168 .Sp
169 .Vb 4
170 \& DSA PRIVATE KEY
171 \& NEW CERTIFICATE REQUEST
172 \& RSA PUBLIC KEY
173 \& X509 CERTIFICATE
174 .Ve
175 .IP \fBSMIME\fR 4
176 .IX Item "SMIME"
177 An S/MIME object as described in IETF RFC 8551.
178 Earlier versions were known as CMS and are compatible.
179 Note that the parsing is simple and might fail to parse some legal data.
180 .SH COPYRIGHT
181 .IX Header "COPYRIGHT"
182 Copyright 2000\-2026 The OpenSSL Project Authors. All Rights Reserved.
183 .PP
184 Licensed under the Apache License 2.0 (the "License"). You may not use
185 this file except in compliance with the License. You can obtain a copy
186 in the file LICENSE in the source distribution or at
187 <https://www.openssl.org/source/license.html>.