]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3
MFC: r359486
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / man3 / SSL_CONF_cmd.3
1 .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.40)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{\
60 .    if \nF \{\
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 .        if !\nF==2 \{\
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "SSL_CONF_CMD 3"
136 .TH SSL_CONF_CMD 3 "2020-03-31" "1.1.1f" "OpenSSL"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 SSL_CONF_cmd_value_type, SSL_CONF_cmd \- send configuration command
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 .Vb 1
146 \& #include <openssl/ssl.h>
147 \&
148 \& int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value);
149 \& int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd);
150 .Ve
151 .SH "DESCRIPTION"
152 .IX Header "DESCRIPTION"
153 The function \fBSSL_CONF_cmd()\fR performs configuration operation \fBcmd\fR with
154 optional parameter \fBvalue\fR on \fBctx\fR. Its purpose is to simplify application
155 configuration of \fB\s-1SSL_CTX\s0\fR or \fB\s-1SSL\s0\fR structures by providing a common
156 framework for command line options or configuration files.
157 .PP
158 \&\fBSSL_CONF_cmd_value_type()\fR returns the type of value that \fBcmd\fR refers to.
159 .SH "SUPPORTED COMMAND LINE COMMANDS"
160 .IX Header "SUPPORTED COMMAND LINE COMMANDS"
161 Currently supported \fBcmd\fR names for command lines (i.e. when the
162 flag \fB\s-1SSL_CONF_CMDLINE\s0\fR is set) are listed below. Note: all \fBcmd\fR names
163 are case sensitive. Unless otherwise stated commands can be used by
164 both clients and servers and the \fBvalue\fR parameter is not used. The default
165 prefix for command line commands is \fB\-\fR and that is reflected below.
166 .IP "\fB\-sigalgs\fR" 4
167 .IX Item "-sigalgs"
168 This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
169 For clients this
170 value is used directly for the supported signature algorithms extension. For
171 servers it is used to determine which signature algorithms to support.
172 .Sp
173 The \fBvalue\fR argument should be a colon separated list of signature algorithms
174 in order of decreasing preference of the form \fBalgorithm+hash\fR or
175 \&\fBsignature_scheme\fR. \fBalgorithm\fR
176 is one of \fB\s-1RSA\s0\fR, \fB\s-1DSA\s0\fR or \fB\s-1ECDSA\s0\fR and \fBhash\fR is a supported algorithm
177 \&\s-1OID\s0 short name such as \fB\s-1SHA1\s0\fR, \fB\s-1SHA224\s0\fR, \fB\s-1SHA256\s0\fR, \fB\s-1SHA384\s0\fR of \fB\s-1SHA512\s0\fR.
178 Note: algorithm and hash names are case sensitive.
179 \&\fBsignature_scheme\fR is one of the signature schemes defined in TLSv1.3,
180 specified using the \s-1IETF\s0 name, e.g., \fBecdsa_secp256r1_sha256\fR, \fBed25519\fR,
181 or \fBrsa_pss_pss_sha256\fR.
182 .Sp
183 If this option is not set then all signature algorithms supported by the
184 OpenSSL library are permissible.
185 .Sp
186 Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
187 using \fB\s-1RSA\s0\fR as the \fBalgorithm\fR or by using one of the \fBrsa_pkcs1_*\fR
188 identifiers) are ignored in TLSv1.3 and will not be negotiated.
189 .IP "\fB\-client_sigalgs\fR" 4
190 .IX Item "-client_sigalgs"
191 This sets the supported signature algorithms associated with client
192 authentication for TLSv1.2 and TLSv1.3.
193 For servers the value is used in the
194 \&\fBsignature_algorithms\fR field of a \fBCertificateRequest\fR message.
195 For clients it is
196 used to determine which signature algorithm to use with the client certificate.
197 If a server does not request a certificate this option has no effect.
198 .Sp
199 The syntax of \fBvalue\fR is identical to \fB\-sigalgs\fR. If not set then
200 the value set for \fB\-sigalgs\fR will be used instead.
201 .IP "\fB\-groups\fR" 4
202 .IX Item "-groups"
203 This sets the supported groups. For clients, the groups are
204 sent using the supported groups extension. For servers, it is used
205 to determine which group to use. This setting affects groups used for
206 signatures (in TLSv1.2 and earlier) and key exchange. The first group listed
207 will also be used for the \fBkey_share\fR sent by a client in a TLSv1.3
208 \&\fBClientHello\fR.
209 .Sp
210 The \fBvalue\fR argument is a colon separated list of groups. The group can be
211 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR), some other commonly used name where
212 applicable (e.g. \fBX25519\fR) or an OpenSSL \s-1OID\s0 name (e.g \fBprime256v1\fR). Group
213 names are case sensitive. The list should be in order of preference with the
214 most preferred group first.
215 .IP "\fB\-curves\fR" 4
216 .IX Item "-curves"
217 This is a synonym for the \*(L"\-groups\*(R" command.
218 .IP "\fB\-named_curve\fR" 4
219 .IX Item "-named_curve"
220 This sets the temporary curve used for ephemeral \s-1ECDH\s0 modes. Only used by
221 servers
222 .Sp
223 The \fBvalue\fR argument is a curve name or the special value \fBauto\fR which
224 picks an appropriate curve based on client and server preferences. The curve
225 can be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name
226 (e.g \fBprime256v1\fR). Curve names are case sensitive.
227 .IP "\fB\-cipher\fR" 4
228 .IX Item "-cipher"
229 Sets the TLSv1.2 and below ciphersuite list to \fBvalue\fR. This list will be
230 combined with any configured TLSv1.3 ciphersuites. Note: syntax checking
231 of \fBvalue\fR is currently not performed unless a \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR structure is
232 associated with \fBcctx\fR.
233 .IP "\fB\-ciphersuites\fR" 4
234 .IX Item "-ciphersuites"
235 Sets the available ciphersuites for TLSv1.3 to value. This is a simple colon
236 (\*(L":\*(R") separated list of TLSv1.3 ciphersuite names in order of preference. This
237 list will be combined any configured TLSv1.2 and below ciphersuites.
238 See \fBciphers\fR\|(1) for more information.
239 .IP "\fB\-cert\fR" 4
240 .IX Item "-cert"
241 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
242 context. It currently uses \fBSSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
243 structure is set or \fBSSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
244 structure is set. This option is only supported if certificate operations
245 are permitted.
246 .IP "\fB\-key\fR" 4
247 .IX Item "-key"
248 Attempts to use the file \fBvalue\fR as the private key for the appropriate
249 context. This option is only supported if certificate operations
250 are permitted. Note: if no \fB\-key\fR option is set then a private key is
251 not loaded unless the flag \fB\s-1SSL_CONF_FLAG_REQUIRE_PRIVATE\s0\fR is set.
252 .IP "\fB\-dhparam\fR" 4
253 .IX Item "-dhparam"
254 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
255 the appropriate context. This option is only supported if certificate
256 operations are permitted.
257 .IP "\fB\-record_padding\fR" 4
258 .IX Item "-record_padding"
259 Attempts to pad TLSv1.3 records so that they are a multiple of \fBvalue\fR in
260 length on send. A \fBvalue\fR of 0 or 1 turns off padding. Otherwise, the
261 \&\fBvalue\fR must be >1 or <=16384.
262 .IP "\fB\-no_renegotiation\fR" 4
263 .IX Item "-no_renegotiation"
264 Disables all attempts at renegotiation in TLSv1.2 and earlier, same as setting
265 \&\fB\s-1SSL_OP_NO_RENEGOTIATION\s0\fR.
266 .IP "\fB\-min_protocol\fR, \fB\-max_protocol\fR" 4
267 .IX Item "-min_protocol, -max_protocol"
268 Sets the minimum and maximum supported protocol.
269 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR,
270 \&\fBTLSv1.1\fR, \fBTLSv1.2\fR, \fBTLSv1.3\fR for \s-1TLS\s0 and \fBDTLSv1\fR, \fBDTLSv1.2\fR for \s-1DTLS,\s0
271 and \fBNone\fR for no limit.
272 If either bound is not specified then only the other bound applies,
273 if specified.
274 To restrict the supported protocol versions use these commands rather
275 than the deprecated alternative commands below.
276 .IP "\fB\-no_ssl3\fR, \fB\-no_tls1\fR, \fB\-no_tls1_1\fR, \fB\-no_tls1_2\fR, \fB\-no_tls1_3\fR" 4
277 .IX Item "-no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2, -no_tls1_3"
278 Disables protocol support for SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 by
279 setting the corresponding options \fBSSL_OP_NO_SSLv3\fR, \fBSSL_OP_NO_TLSv1\fR,
280 \&\fBSSL_OP_NO_TLSv1_1\fR, \fBSSL_OP_NO_TLSv1_2\fR and \fBSSL_OP_NO_TLSv1_3\fR
281 respectively. These options are deprecated, instead use \fB\-min_protocol\fR and
282 \&\fB\-max_protocol\fR.
283 .IP "\fB\-bugs\fR" 4
284 .IX Item "-bugs"
285 Various bug workarounds are set, same as setting \fB\s-1SSL_OP_ALL\s0\fR.
286 .IP "\fB\-comp\fR" 4
287 .IX Item "-comp"
288 Enables support for \s-1SSL/TLS\s0 compression, same as clearing
289 \&\fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
290 This command was introduced in OpenSSL 1.1.0.
291 As of OpenSSL 1.1.0, compression is off by default.
292 .IP "\fB\-no_comp\fR" 4
293 .IX Item "-no_comp"
294 Disables support for \s-1SSL/TLS\s0 compression, same as setting
295 \&\fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
296 As of OpenSSL 1.1.0, compression is off by default.
297 .IP "\fB\-no_ticket\fR" 4
298 .IX Item "-no_ticket"
299 Disables support for session tickets, same as setting \fB\s-1SSL_OP_NO_TICKET\s0\fR.
300 .IP "\fB\-serverpref\fR" 4
301 .IX Item "-serverpref"
302 Use server and not client preference order when determining which cipher suite,
303 signature algorithm or elliptic curve to use for an incoming connection.
304 Equivalent to \fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
305 .IP "\fB\-prioritize_chacha\fR" 4
306 .IX Item "-prioritize_chacha"
307 Prioritize ChaCha ciphers when the client has a ChaCha20 cipher at the top of
308 its preference list. This usually indicates a client without \s-1AES\s0 hardware
309 acceleration (e.g. mobile) is in use. Equivalent to \fB\s-1SSL_OP_PRIORITIZE_CHACHA\s0\fR.
310 Only used by servers. Requires \fB\-serverpref\fR.
311 .IP "\fB\-no_resumption_on_reneg\fR" 4
312 .IX Item "-no_resumption_on_reneg"
313 set \s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0 flag. Only used by servers.
314 .IP "\fB\-legacyrenegotiation\fR" 4
315 .IX Item "-legacyrenegotiation"
316 permits the use of unsafe legacy renegotiation. Equivalent to setting
317 \&\fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
318 .IP "\fB\-legacy_server_connect\fR, \fB\-no_legacy_server_connect\fR" 4
319 .IX Item "-legacy_server_connect, -no_legacy_server_connect"
320 permits or prohibits the use of unsafe legacy renegotiation for OpenSSL
321 clients only. Equivalent to setting or clearing \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
322 Set by default.
323 .IP "\fB\-allow_no_dhe_kex\fR" 4
324 .IX Item "-allow_no_dhe_kex"
325 In TLSv1.3 allow a non\-(ec)dhe based key exchange mode on resumption. This means
326 that there will be no forward secrecy for the resumed session.
327 .IP "\fB\-strict\fR" 4
328 .IX Item "-strict"
329 enables strict mode protocol handling. Equivalent to setting
330 \&\fB\s-1SSL_CERT_FLAG_TLS_STRICT\s0\fR.
331 .IP "\fB\-anti_replay\fR, \fB\-no_anti_replay\fR" 4
332 .IX Item "-anti_replay, -no_anti_replay"
333 Switches replay protection, on or off respectively. With replay protection on,
334 OpenSSL will automatically detect if a session ticket has been used more than
335 once, TLSv1.3 has been negotiated, and early data is enabled on the server. A
336 full handshake is forced if a session ticket is used a second or subsequent
337 time. Anti-Replay is on by default unless overridden by a configuration file and
338 is only used by servers. Anti-replay measures are required for compliance with
339 the TLSv1.3 specification. Some applications may be able to mitigate the replay
340 risks in other ways and in such cases the built-in OpenSSL functionality is not
341 required. Switching off anti-replay is equivalent to \fB\s-1SSL_OP_NO_ANTI_REPLAY\s0\fR.
342 .SH "SUPPORTED CONFIGURATION FILE COMMANDS"
343 .IX Header "SUPPORTED CONFIGURATION FILE COMMANDS"
344 Currently supported \fBcmd\fR names for configuration files (i.e. when the
345 flag \fB\s-1SSL_CONF_FLAG_FILE\s0\fR is set) are listed below. All configuration file
346 \&\fBcmd\fR names are case insensitive so \fBsignaturealgorithms\fR is recognised
347 as well as \fBSignatureAlgorithms\fR. Unless otherwise stated the \fBvalue\fR names
348 are also case insensitive.
349 .PP
350 Note: the command prefix (if set) alters the recognised \fBcmd\fR values.
351 .IP "\fBCipherString\fR" 4
352 .IX Item "CipherString"
353 Sets the ciphersuite list for TLSv1.2 and below to \fBvalue\fR. This list will be
354 combined with any configured TLSv1.3 ciphersuites. Note: syntax
355 checking of \fBvalue\fR is currently not performed unless an \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR
356 structure is associated with \fBcctx\fR.
357 .IP "\fBCiphersuites\fR" 4
358 .IX Item "Ciphersuites"
359 Sets the available ciphersuites for TLSv1.3 to \fBvalue\fR. This is a simple colon
360 (\*(L":\*(R") separated list of TLSv1.3 ciphersuite names in order of preference. This
361 list will be combined any configured TLSv1.2 and below ciphersuites.
362 See \fBciphers\fR\|(1) for more information.
363 .IP "\fBCertificate\fR" 4
364 .IX Item "Certificate"
365 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
366 context. It currently uses \fBSSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
367 structure is set or \fBSSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
368 structure is set. This option is only supported if certificate operations
369 are permitted.
370 .IP "\fBPrivateKey\fR" 4
371 .IX Item "PrivateKey"
372 Attempts to use the file \fBvalue\fR as the private key for the appropriate
373 context. This option is only supported if certificate operations
374 are permitted. Note: if no \fBPrivateKey\fR option is set then a private key is
375 not loaded unless the \fB\s-1SSL_CONF_FLAG_REQUIRE_PRIVATE\s0\fR is set.
376 .IP "\fBChainCAFile\fR, \fBChainCAPath\fR, \fBVerifyCAFile\fR, \fBVerifyCAPath\fR" 4
377 .IX Item "ChainCAFile, ChainCAPath, VerifyCAFile, VerifyCAPath"
378 These options indicate a file or directory used for building certificate
379 chains or verifying certificate chains. These options are only supported
380 if certificate operations are permitted.
381 .IP "\fBRequestCAFile\fR" 4
382 .IX Item "RequestCAFile"
383 This option indicates a file containing a set of certificates in \s-1PEM\s0 form.
384 The subject names of the certificates are sent to the peer in the
385 \&\fBcertificate_authorities\fR extension for \s-1TLS 1.3\s0 (in ClientHello or
386 CertificateRequest) or in a certificate request for previous versions or
387 \&\s-1TLS.\s0
388 .IP "\fBServerInfoFile\fR" 4
389 .IX Item "ServerInfoFile"
390 Attempts to use the file \fBvalue\fR in the \*(L"serverinfo\*(R" extension using the
391 function SSL_CTX_use_serverinfo_file.
392 .IP "\fBDHParameters\fR" 4
393 .IX Item "DHParameters"
394 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
395 the appropriate context. This option is only supported if certificate
396 operations are permitted.
397 .IP "\fBRecordPadding\fR" 4
398 .IX Item "RecordPadding"
399 Attempts to pad TLSv1.3 records so that they are a multiple of \fBvalue\fR in
400 length on send. A \fBvalue\fR of 0 or 1 turns off padding. Otherwise, the
401 \&\fBvalue\fR must be >1 or <=16384.
402 .IP "\fBSignatureAlgorithms\fR" 4
403 .IX Item "SignatureAlgorithms"
404 This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
405 For clients this
406 value is used directly for the supported signature algorithms extension. For
407 servers it is used to determine which signature algorithms to support.
408 .Sp
409 The \fBvalue\fR argument should be a colon separated list of signature algorithms
410 in order of decreasing preference of the form \fBalgorithm+hash\fR or
411 \&\fBsignature_scheme\fR. \fBalgorithm\fR
412 is one of \fB\s-1RSA\s0\fR, \fB\s-1DSA\s0\fR or \fB\s-1ECDSA\s0\fR and \fBhash\fR is a supported algorithm
413 \&\s-1OID\s0 short name such as \fB\s-1SHA1\s0\fR, \fB\s-1SHA224\s0\fR, \fB\s-1SHA256\s0\fR, \fB\s-1SHA384\s0\fR of \fB\s-1SHA512\s0\fR.
414 Note: algorithm and hash names are case sensitive.
415 \&\fBsignature_scheme\fR is one of the signature schemes defined in TLSv1.3,
416 specified using the \s-1IETF\s0 name, e.g., \fBecdsa_secp256r1_sha256\fR, \fBed25519\fR,
417 or \fBrsa_pss_pss_sha256\fR.
418 .Sp
419 If this option is not set then all signature algorithms supported by the
420 OpenSSL library are permissible.
421 .Sp
422 Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
423 using \fB\s-1RSA\s0\fR as the \fBalgorithm\fR or by using one of the \fBrsa_pkcs1_*\fR
424 identifiers) are ignored in TLSv1.3 and will not be negotiated.
425 .IP "\fBClientSignatureAlgorithms\fR" 4
426 .IX Item "ClientSignatureAlgorithms"
427 This sets the supported signature algorithms associated with client
428 authentication for TLSv1.2 and TLSv1.3.
429 For servers the value is used in the
430 \&\fBsignature_algorithms\fR field of a \fBCertificateRequest\fR message.
431 For clients it is
432 used to determine which signature algorithm to use with the client certificate.
433 If a server does not request a certificate this option has no effect.
434 .Sp
435 The syntax of \fBvalue\fR is identical to \fBSignatureAlgorithms\fR. If not set then
436 the value set for \fBSignatureAlgorithms\fR will be used instead.
437 .IP "\fBGroups\fR" 4
438 .IX Item "Groups"
439 This sets the supported groups. For clients, the groups are
440 sent using the supported groups extension. For servers, it is used
441 to determine which group to use. This setting affects groups used for
442 signatures (in TLSv1.2 and earlier) and key exchange. The first group listed
443 will also be used for the \fBkey_share\fR sent by a client in a TLSv1.3
444 \&\fBClientHello\fR.
445 .Sp
446 The \fBvalue\fR argument is a colon separated list of groups. The group can be
447 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR), some other commonly used name where
448 applicable (e.g. \fBX25519\fR) or an OpenSSL \s-1OID\s0 name (e.g \fBprime256v1\fR). Group
449 names are case sensitive. The list should be in order of preference with the
450 most preferred group first.
451 .IP "\fBCurves\fR" 4
452 .IX Item "Curves"
453 This is a synonym for the \*(L"Groups\*(R" command.
454 .IP "\fBMinProtocol\fR" 4
455 .IX Item "MinProtocol"
456 This sets the minimum supported \s-1SSL, TLS\s0 or \s-1DTLS\s0 version.
457 .Sp
458 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
459 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
460 The value \fBNone\fR will disable the limit.
461 .IP "\fBMaxProtocol\fR" 4
462 .IX Item "MaxProtocol"
463 This sets the maximum supported \s-1SSL, TLS\s0 or \s-1DTLS\s0 version.
464 .Sp
465 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
466 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
467 The value \fBNone\fR will disable the limit.
468 .IP "\fBProtocol\fR" 4
469 .IX Item "Protocol"
470 This can be used to enable or disable certain versions of the \s-1SSL,
471 TLS\s0 or \s-1DTLS\s0 protocol.
472 .Sp
473 The \fBvalue\fR argument is a comma separated list of supported protocols
474 to enable or disable.
475 If a protocol is preceded by \fB\-\fR that version is disabled.
476 .Sp
477 All protocol versions are enabled by default.
478 You need to disable at least one protocol version for this setting have any
479 effect.
480 Only enabling some protocol versions does not disable the other protocol
481 versions.
482 .Sp
483 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
484 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
485 The special value \fB\s-1ALL\s0\fR refers to all supported versions.
486 .Sp
487 This can't enable protocols that are disabled using \fBMinProtocol\fR
488 or \fBMaxProtocol\fR, but can disable protocols that are still allowed
489 by them.
490 .Sp
491 The \fBProtocol\fR command is fragile and deprecated; do not use it.
492 Use \fBMinProtocol\fR and \fBMaxProtocol\fR instead.
493 If you do use \fBProtocol\fR, make sure that the resulting range of enabled
494 protocols has no \*(L"holes\*(R", e.g. if \s-1TLS 1.0\s0 and \s-1TLS 1.2\s0 are both enabled, make
495 sure to also leave \s-1TLS 1.1\s0 enabled.
496 .IP "\fBOptions\fR" 4
497 .IX Item "Options"
498 The \fBvalue\fR argument is a comma separated list of various flags to set.
499 If a flag string is preceded \fB\-\fR it is disabled.
500 See the \fBSSL_CTX_set_options\fR\|(3) function for more details of
501 individual options.
502 .Sp
503 Each option is listed below. Where an operation is enabled by default
504 the \fB\-flag\fR syntax is needed to disable it.
505 .Sp
506 \&\fBSessionTicket\fR: session ticket support, enabled by default. Inverse of
507 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR: that is \fB\-SessionTicket\fR is the same as setting
508 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR.
509 .Sp
510 \&\fBCompression\fR: \s-1SSL/TLS\s0 compression support, enabled by default. Inverse
511 of \fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
512 .Sp
513 \&\fBEmptyFragments\fR: use empty fragments as a countermeasure against a
514 \&\s-1SSL 3.0/TLS 1.0\s0 protocol vulnerability affecting \s-1CBC\s0 ciphers. It
515 is set by default. Inverse of \fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0\fR.
516 .Sp
517 \&\fBBugs\fR: enable various bug workarounds. Same as \fB\s-1SSL_OP_ALL\s0\fR.
518 .Sp
519 \&\fBDHSingle\fR: enable single use \s-1DH\s0 keys, set by default. Inverse of
520 \&\fB\s-1SSL_OP_DH_SINGLE\s0\fR. Only used by servers.
521 .Sp
522 \&\fBECDHSingle\fR: enable single use \s-1ECDH\s0 keys, set by default. Inverse of
523 \&\fB\s-1SSL_OP_ECDH_SINGLE\s0\fR. Only used by servers.
524 .Sp
525 \&\fBServerPreference\fR: use server and not client preference order when
526 determining which cipher suite, signature algorithm or elliptic curve
527 to use for an incoming connection.  Equivalent to
528 \&\fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
529 .Sp
530 \&\fBPrioritizeChaCha\fR: prioritizes ChaCha ciphers when the client has a
531 ChaCha20 cipher at the top of its preference list. This usually indicates
532 a mobile client is in use. Equivalent to \fB\s-1SSL_OP_PRIORITIZE_CHACHA\s0\fR.
533 Only used by servers.
534 .Sp
535 \&\fBNoResumptionOnRenegotiation\fR: set
536 \&\fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR flag. Only used by servers.
537 .Sp
538 \&\fBNoRenegotiation\fR: disables all attempts at renegotiation in TLSv1.2 and
539 earlier, same as setting \fB\s-1SSL_OP_NO_RENEGOTIATION\s0\fR.
540 .Sp
541 \&\fBUnsafeLegacyRenegotiation\fR: permits the use of unsafe legacy renegotiation.
542 Equivalent to \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
543 .Sp
544 \&\fBUnsafeLegacyServerConnect\fR: permits the use of unsafe legacy renegotiation
545 for OpenSSL clients only. Equivalent to \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
546 Set by default.
547 .Sp
548 \&\fBEncryptThenMac\fR: use encrypt-then-mac extension, enabled by
549 default. Inverse of \fB\s-1SSL_OP_NO_ENCRYPT_THEN_MAC\s0\fR: that is,
550 \&\fB\-EncryptThenMac\fR is the same as setting \fB\s-1SSL_OP_NO_ENCRYPT_THEN_MAC\s0\fR.
551 .Sp
552 \&\fBAllowNoDHEKEX\fR: In TLSv1.3 allow a non\-(ec)dhe based key exchange mode on
553 resumption. This means that there will be no forward secrecy for the resumed
554 session. Equivalent to \fB\s-1SSL_OP_ALLOW_NO_DHE_KEX\s0\fR.
555 .Sp
556 \&\fBMiddleboxCompat\fR: If set then dummy Change Cipher Spec (\s-1CCS\s0) messages are sent
557 in TLSv1.3. This has the effect of making TLSv1.3 look more like TLSv1.2 so that
558 middleboxes that do not understand TLSv1.3 will not drop the connection. This
559 option is set by default. A future version of OpenSSL may not set this by
560 default. Equivalent to \fB\s-1SSL_OP_ENABLE_MIDDLEBOX_COMPAT\s0\fR.
561 .Sp
562 \&\fBAntiReplay\fR: If set then OpenSSL will automatically detect if a session ticket
563 has been used more than once, TLSv1.3 has been negotiated, and early data is
564 enabled on the server. A full handshake is forced if a session ticket is used a
565 second or subsequent time. This option is set by default and is only used by
566 servers. Anti-replay measures are required to comply with the TLSv1.3
567 specification. Some applications may be able to mitigate the replay risks in
568 other ways and in such cases the built-in OpenSSL functionality is not required.
569 Disabling anti-replay is equivalent to setting \fB\s-1SSL_OP_NO_ANTI_REPLAY\s0\fR.
570 .IP "\fBVerifyMode\fR" 4
571 .IX Item "VerifyMode"
572 The \fBvalue\fR argument is a comma separated list of flags to set.
573 .Sp
574 \&\fBPeer\fR enables peer verification: for clients only.
575 .Sp
576 \&\fBRequest\fR requests but does not require a certificate from the client.
577 Servers only.
578 .Sp
579 \&\fBRequire\fR requests and requires a certificate from the client: an error
580 occurs if the client does not present a certificate. Servers only.
581 .Sp
582 \&\fBOnce\fR requests a certificate from a client only on the initial connection:
583 not when renegotiating. Servers only.
584 .Sp
585 \&\fBRequestPostHandshake\fR configures the connection to support requests but does
586 not require a certificate from the client post-handshake. A certificate will
587 not be requested during the initial handshake. The server application must
588 provide a mechanism to request a certificate post-handshake. Servers only.
589 TLSv1.3 only.
590 .Sp
591 \&\fBRequiresPostHandshake\fR configures the connection to support requests and
592 requires a certificate from the client post-handshake: an error occurs if the
593 client does not present a certificate. A certificate will not be requested
594 during the initial handshake. The server application must provide a mechanism
595 to request a certificate post-handshake. Servers only. TLSv1.3 only.
596 .IP "\fBClientCAFile\fR, \fBClientCAPath\fR" 4
597 .IX Item "ClientCAFile, ClientCAPath"
598 A file or directory of certificates in \s-1PEM\s0 format whose names are used as the
599 set of acceptable names for client CAs. Servers only. This option is only
600 supported if certificate operations are permitted.
601 .SH "SUPPORTED COMMAND TYPES"
602 .IX Header "SUPPORTED COMMAND TYPES"
603 The function \fBSSL_CONF_cmd_value_type()\fR currently returns one of the following
604 types:
605 .IP "\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR" 4
606 .IX Item "SSL_CONF_TYPE_UNKNOWN"
607 The \fBcmd\fR string is unrecognised, this return value can be use to flag
608 syntax errors.
609 .IP "\fB\s-1SSL_CONF_TYPE_STRING\s0\fR" 4
610 .IX Item "SSL_CONF_TYPE_STRING"
611 The value is a string without any specific structure.
612 .IP "\fB\s-1SSL_CONF_TYPE_FILE\s0\fR" 4
613 .IX Item "SSL_CONF_TYPE_FILE"
614 The value is a file name.
615 .IP "\fB\s-1SSL_CONF_TYPE_DIR\s0\fR" 4
616 .IX Item "SSL_CONF_TYPE_DIR"
617 The value is a directory name.
618 .IP "\fB\s-1SSL_CONF_TYPE_NONE\s0\fR" 4
619 .IX Item "SSL_CONF_TYPE_NONE"
620 The value string is not used e.g. a command line option which doesn't take an
621 argument.
622 .SH "NOTES"
623 .IX Header "NOTES"
624 The order of operations is significant. This can be used to set either defaults
625 or values which cannot be overridden. For example if an application calls:
626 .PP
627 .Vb 2
628 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
629 \& SSL_CONF_cmd(ctx, userparam, uservalue);
630 .Ve
631 .PP
632 it will disable SSLv3 support by default but the user can override it. If
633 however the call sequence is:
634 .PP
635 .Vb 2
636 \& SSL_CONF_cmd(ctx, userparam, uservalue);
637 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
638 .Ve
639 .PP
640 SSLv3 is \fBalways\fR disabled and attempt to override this by the user are
641 ignored.
642 .PP
643 By checking the return code of \fBSSL_CONF_cmd()\fR it is possible to query if a
644 given \fBcmd\fR is recognised, this is useful if \fBSSL_CONF_cmd()\fR values are
645 mixed with additional application specific operations.
646 .PP
647 For example an application might call \fBSSL_CONF_cmd()\fR and if it returns
648 \&\-2 (unrecognised command) continue with processing of application specific
649 commands.
650 .PP
651 Applications can also use \fBSSL_CONF_cmd()\fR to process command lines though the
652 utility function \fBSSL_CONF_cmd_argv()\fR is normally used instead. One way
653 to do this is to set the prefix to an appropriate value using
654 \&\fBSSL_CONF_CTX_set1_prefix()\fR, pass the current argument to \fBcmd\fR and the
655 following argument to \fBvalue\fR (which may be \s-1NULL\s0).
656 .PP
657 In this case if the return value is positive then it is used to skip that
658 number of arguments as they have been processed by \fBSSL_CONF_cmd()\fR. If \-2 is
659 returned then \fBcmd\fR is not recognised and application specific arguments
660 can be checked instead. If \-3 is returned a required argument is missing
661 and an error is indicated. If 0 is returned some other error occurred and
662 this can be reported back to the user.
663 .PP
664 The function \fBSSL_CONF_cmd_value_type()\fR can be used by applications to
665 check for the existence of a command or to perform additional syntax
666 checking or translation of the command value. For example if the return
667 value is \fB\s-1SSL_CONF_TYPE_FILE\s0\fR an application could translate a relative
668 pathname to an absolute pathname.
669 .SH "RETURN VALUES"
670 .IX Header "RETURN VALUES"
671 \&\fBSSL_CONF_cmd()\fR returns 1 if the value of \fBcmd\fR is recognised and \fBvalue\fR is
672 \&\fB\s-1NOT\s0\fR used and 2 if both \fBcmd\fR and \fBvalue\fR are used. In other words it
673 returns the number of arguments processed. This is useful when processing
674 command lines.
675 .PP
676 A return value of \-2 means \fBcmd\fR is not recognised.
677 .PP
678 A return value of \-3 means \fBcmd\fR is recognised and the command requires a
679 value but \fBvalue\fR is \s-1NULL.\s0
680 .PP
681 A return code of 0 indicates that both \fBcmd\fR and \fBvalue\fR are valid but an
682 error occurred attempting to perform the operation: for example due to an
683 error in the syntax of \fBvalue\fR in this case the error queue may provide
684 additional information.
685 .SH "EXAMPLES"
686 .IX Header "EXAMPLES"
687 Set supported signature algorithms:
688 .PP
689 .Vb 1
690 \& SSL_CONF_cmd(ctx, "SignatureAlgorithms", "ECDSA+SHA256:RSA+SHA256:DSA+SHA256");
691 .Ve
692 .PP
693 There are various ways to select the supported protocols.
694 .PP
695 This set the minimum protocol version to TLSv1, and so disables SSLv3.
696 This is the recommended way to disable protocols.
697 .PP
698 .Vb 1
699 \& SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1");
700 .Ve
701 .PP
702 The following also disables SSLv3:
703 .PP
704 .Vb 1
705 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
706 .Ve
707 .PP
708 The following will first enable all protocols, and then disable
709 SSLv3.
710 If no protocol versions were disabled before this has the same effect as
711 \&\*(L"\-SSLv3\*(R", but if some versions were disables this will re-enable them before
712 disabling SSLv3.
713 .PP
714 .Vb 1
715 \& SSL_CONF_cmd(ctx, "Protocol", "ALL,\-SSLv3");
716 .Ve
717 .PP
718 Only enable TLSv1.2:
719 .PP
720 .Vb 2
721 \& SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1.2");
722 \& SSL_CONF_cmd(ctx, "MaxProtocol", "TLSv1.2");
723 .Ve
724 .PP
725 This also only enables TLSv1.2:
726 .PP
727 .Vb 1
728 \& SSL_CONF_cmd(ctx, "Protocol", "\-ALL,TLSv1.2");
729 .Ve
730 .PP
731 Disable \s-1TLS\s0 session tickets:
732 .PP
733 .Vb 1
734 \& SSL_CONF_cmd(ctx, "Options", "\-SessionTicket");
735 .Ve
736 .PP
737 Enable compression:
738 .PP
739 .Vb 1
740 \& SSL_CONF_cmd(ctx, "Options", "Compression");
741 .Ve
742 .PP
743 Set supported curves to P\-256, P\-384:
744 .PP
745 .Vb 1
746 \& SSL_CONF_cmd(ctx, "Curves", "P\-256:P\-384");
747 .Ve
748 .SH "SEE ALSO"
749 .IX Header "SEE ALSO"
750 \&\fBSSL_CONF_CTX_new\fR\|(3),
751 \&\fBSSL_CONF_CTX_set_flags\fR\|(3),
752 \&\fBSSL_CONF_CTX_set1_prefix\fR\|(3),
753 \&\fBSSL_CONF_CTX_set_ssl_ctx\fR\|(3),
754 \&\fBSSL_CONF_cmd_argv\fR\|(3),
755 \&\fBSSL_CTX_set_options\fR\|(3)
756 .SH "HISTORY"
757 .IX Header "HISTORY"
758 The \fBSSL_CONF_cmd()\fR function was added in OpenSSL 1.0.2.
759 .PP
760 The \fB\s-1SSL_OP_NO_SSL2\s0\fR option doesn't have effect since 1.1.0, but the macro
761 is retained for backwards compatibility.
762 .PP
763 The \fB\s-1SSL_CONF_TYPE_NONE\s0\fR was added in OpenSSL 1.1.0. In earlier versions of
764 OpenSSL passing a command which didn't take an argument would return
765 \&\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR.
766 .PP
767 \&\fBMinProtocol\fR and \fBMaxProtocol\fR where added in OpenSSL 1.1.0.
768 .PP
769 \&\fBAllowNoDHEKEX\fR and \fBPrioritizeChaCha\fR were added in OpenSSL 1.1.1.
770 .SH "COPYRIGHT"
771 .IX Header "COPYRIGHT"
772 Copyright 2012\-2019 The OpenSSL Project Authors. All Rights Reserved.
773 .PP
774 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
775 this file except in compliance with the License.  You can obtain a copy
776 in the file \s-1LICENSE\s0 in the source distribution or at
777 <https://www.openssl.org/source/license.html>.