]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/man3/SSL_CONF_cmd.3
OpenSSL: Regen manual pages for OpenSSL 1.1.1o
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / man3 / SSL_CONF_cmd.3
1 .\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
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 "2022-05-03" "1.1.1o" "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, \fBTLSv1.1\fR,
270 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR for \s-1TLS\s0; \fBDTLSv1\fR, \fBDTLSv1.2\fR for \s-1DTLS,\s0 and \fBNone\fR
271 for no limit.
272 If either the lower or upper bound is not specified then only the other bound
273 applies, if specified.
274 If your application supports both \s-1TLS\s0 and \s-1DTLS\s0 you can specify any of these
275 options twice, once with a bound for \s-1TLS\s0 and again with an appropriate bound
276 for \s-1DTLS.\s0
277 To restrict the supported protocol versions use these commands rather than the
278 deprecated alternative commands below.
279 .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
280 .IX Item "-no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2, -no_tls1_3"
281 Disables protocol support for SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 by
282 setting the corresponding options \fBSSL_OP_NO_SSLv3\fR, \fBSSL_OP_NO_TLSv1\fR,
283 \&\fBSSL_OP_NO_TLSv1_1\fR, \fBSSL_OP_NO_TLSv1_2\fR and \fBSSL_OP_NO_TLSv1_3\fR
284 respectively. These options are deprecated, instead use \fB\-min_protocol\fR and
285 \&\fB\-max_protocol\fR.
286 .IP "\fB\-bugs\fR" 4
287 .IX Item "-bugs"
288 Various bug workarounds are set, same as setting \fB\s-1SSL_OP_ALL\s0\fR.
289 .IP "\fB\-comp\fR" 4
290 .IX Item "-comp"
291 Enables support for \s-1SSL/TLS\s0 compression, same as clearing
292 \&\fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
293 This command was introduced in OpenSSL 1.1.0.
294 As of OpenSSL 1.1.0, compression is off by default.
295 .IP "\fB\-no_comp\fR" 4
296 .IX Item "-no_comp"
297 Disables support for \s-1SSL/TLS\s0 compression, same as setting
298 \&\fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
299 As of OpenSSL 1.1.0, compression is off by default.
300 .IP "\fB\-no_ticket\fR" 4
301 .IX Item "-no_ticket"
302 Disables support for session tickets, same as setting \fB\s-1SSL_OP_NO_TICKET\s0\fR.
303 .IP "\fB\-serverpref\fR" 4
304 .IX Item "-serverpref"
305 Use server and not client preference order when determining which cipher suite,
306 signature algorithm or elliptic curve to use for an incoming connection.
307 Equivalent to \fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
308 .IP "\fB\-prioritize_chacha\fR" 4
309 .IX Item "-prioritize_chacha"
310 Prioritize ChaCha ciphers when the client has a ChaCha20 cipher at the top of
311 its preference list. This usually indicates a client without \s-1AES\s0 hardware
312 acceleration (e.g. mobile) is in use. Equivalent to \fB\s-1SSL_OP_PRIORITIZE_CHACHA\s0\fR.
313 Only used by servers. Requires \fB\-serverpref\fR.
314 .IP "\fB\-no_resumption_on_reneg\fR" 4
315 .IX Item "-no_resumption_on_reneg"
316 set \s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0 flag. Only used by servers.
317 .IP "\fB\-legacyrenegotiation\fR" 4
318 .IX Item "-legacyrenegotiation"
319 permits the use of unsafe legacy renegotiation. Equivalent to setting
320 \&\fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
321 .IP "\fB\-legacy_server_connect\fR, \fB\-no_legacy_server_connect\fR" 4
322 .IX Item "-legacy_server_connect, -no_legacy_server_connect"
323 permits or prohibits the use of unsafe legacy renegotiation for OpenSSL
324 clients only. Equivalent to setting or clearing \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
325 Set by default.
326 .IP "\fB\-allow_no_dhe_kex\fR" 4
327 .IX Item "-allow_no_dhe_kex"
328 In TLSv1.3 allow a non\-(ec)dhe based key exchange mode on resumption. This means
329 that there will be no forward secrecy for the resumed session.
330 .IP "\fB\-strict\fR" 4
331 .IX Item "-strict"
332 enables strict mode protocol handling. Equivalent to setting
333 \&\fB\s-1SSL_CERT_FLAG_TLS_STRICT\s0\fR.
334 .IP "\fB\-anti_replay\fR, \fB\-no_anti_replay\fR" 4
335 .IX Item "-anti_replay, -no_anti_replay"
336 Switches replay protection, on or off respectively. With replay protection on,
337 OpenSSL will automatically detect if a session ticket has been used more than
338 once, TLSv1.3 has been negotiated, and early data is enabled on the server. A
339 full handshake is forced if a session ticket is used a second or subsequent
340 time. Anti-Replay is on by default unless overridden by a configuration file and
341 is only used by servers. Anti-replay measures are required for compliance with
342 the TLSv1.3 specification. Some applications may be able to mitigate the replay
343 risks in other ways and in such cases the built-in OpenSSL functionality is not
344 required. Switching off anti-replay is equivalent to \fB\s-1SSL_OP_NO_ANTI_REPLAY\s0\fR.
345 .SH "SUPPORTED CONFIGURATION FILE COMMANDS"
346 .IX Header "SUPPORTED CONFIGURATION FILE COMMANDS"
347 Currently supported \fBcmd\fR names for configuration files (i.e. when the
348 flag \fB\s-1SSL_CONF_FLAG_FILE\s0\fR is set) are listed below. All configuration file
349 \&\fBcmd\fR names are case insensitive so \fBsignaturealgorithms\fR is recognised
350 as well as \fBSignatureAlgorithms\fR. Unless otherwise stated the \fBvalue\fR names
351 are also case insensitive.
352 .PP
353 Note: the command prefix (if set) alters the recognised \fBcmd\fR values.
354 .IP "\fBCipherString\fR" 4
355 .IX Item "CipherString"
356 Sets the ciphersuite list for TLSv1.2 and below to \fBvalue\fR. This list will be
357 combined with any configured TLSv1.3 ciphersuites. Note: syntax
358 checking of \fBvalue\fR is currently not performed unless an \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR
359 structure is associated with \fBcctx\fR.
360 .IP "\fBCiphersuites\fR" 4
361 .IX Item "Ciphersuites"
362 Sets the available ciphersuites for TLSv1.3 to \fBvalue\fR. This is a simple colon
363 (\*(L":\*(R") separated list of TLSv1.3 ciphersuite names in order of preference. This
364 list will be combined any configured TLSv1.2 and below ciphersuites.
365 See \fBciphers\fR\|(1) for more information.
366 .IP "\fBCertificate\fR" 4
367 .IX Item "Certificate"
368 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
369 context. It currently uses \fBSSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
370 structure is set or \fBSSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
371 structure is set. This option is only supported if certificate operations
372 are permitted.
373 .IP "\fBPrivateKey\fR" 4
374 .IX Item "PrivateKey"
375 Attempts to use the file \fBvalue\fR as the private key for the appropriate
376 context. This option is only supported if certificate operations
377 are permitted. Note: if no \fBPrivateKey\fR option is set then a private key is
378 not loaded unless the \fB\s-1SSL_CONF_FLAG_REQUIRE_PRIVATE\s0\fR is set.
379 .IP "\fBChainCAFile\fR, \fBChainCAPath\fR, \fBVerifyCAFile\fR, \fBVerifyCAPath\fR" 4
380 .IX Item "ChainCAFile, ChainCAPath, VerifyCAFile, VerifyCAPath"
381 These options indicate a file or directory used for building certificate
382 chains or verifying certificate chains. These options are only supported
383 if certificate operations are permitted.
384 .IP "\fBRequestCAFile\fR" 4
385 .IX Item "RequestCAFile"
386 This option indicates a file containing a set of certificates in \s-1PEM\s0 form.
387 The subject names of the certificates are sent to the peer in the
388 \&\fBcertificate_authorities\fR extension for \s-1TLS 1.3\s0 (in ClientHello or
389 CertificateRequest) or in a certificate request for previous versions or
390 \&\s-1TLS.\s0
391 .IP "\fBServerInfoFile\fR" 4
392 .IX Item "ServerInfoFile"
393 Attempts to use the file \fBvalue\fR in the \*(L"serverinfo\*(R" extension using the
394 function SSL_CTX_use_serverinfo_file.
395 .IP "\fBDHParameters\fR" 4
396 .IX Item "DHParameters"
397 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
398 the appropriate context. This option is only supported if certificate
399 operations are permitted.
400 .IP "\fBRecordPadding\fR" 4
401 .IX Item "RecordPadding"
402 Attempts to pad TLSv1.3 records so that they are a multiple of \fBvalue\fR in
403 length on send. A \fBvalue\fR of 0 or 1 turns off padding. Otherwise, the
404 \&\fBvalue\fR must be >1 or <=16384.
405 .IP "\fBSignatureAlgorithms\fR" 4
406 .IX Item "SignatureAlgorithms"
407 This sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
408 For clients this
409 value is used directly for the supported signature algorithms extension. For
410 servers it is used to determine which signature algorithms to support.
411 .Sp
412 The \fBvalue\fR argument should be a colon separated list of signature algorithms
413 in order of decreasing preference of the form \fBalgorithm+hash\fR or
414 \&\fBsignature_scheme\fR. \fBalgorithm\fR
415 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
416 \&\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.
417 Note: algorithm and hash names are case sensitive.
418 \&\fBsignature_scheme\fR is one of the signature schemes defined in TLSv1.3,
419 specified using the \s-1IETF\s0 name, e.g., \fBecdsa_secp256r1_sha256\fR, \fBed25519\fR,
420 or \fBrsa_pss_pss_sha256\fR.
421 .Sp
422 If this option is not set then all signature algorithms supported by the
423 OpenSSL library are permissible.
424 .Sp
425 Note: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
426 using \fB\s-1RSA\s0\fR as the \fBalgorithm\fR or by using one of the \fBrsa_pkcs1_*\fR
427 identifiers) are ignored in TLSv1.3 and will not be negotiated.
428 .IP "\fBClientSignatureAlgorithms\fR" 4
429 .IX Item "ClientSignatureAlgorithms"
430 This sets the supported signature algorithms associated with client
431 authentication for TLSv1.2 and TLSv1.3.
432 For servers the value is used in the
433 \&\fBsignature_algorithms\fR field of a \fBCertificateRequest\fR message.
434 For clients it is
435 used to determine which signature algorithm to use with the client certificate.
436 If a server does not request a certificate this option has no effect.
437 .Sp
438 The syntax of \fBvalue\fR is identical to \fBSignatureAlgorithms\fR. If not set then
439 the value set for \fBSignatureAlgorithms\fR will be used instead.
440 .IP "\fBGroups\fR" 4
441 .IX Item "Groups"
442 This sets the supported groups. For clients, the groups are
443 sent using the supported groups extension. For servers, it is used
444 to determine which group to use. This setting affects groups used for
445 signatures (in TLSv1.2 and earlier) and key exchange. The first group listed
446 will also be used for the \fBkey_share\fR sent by a client in a TLSv1.3
447 \&\fBClientHello\fR.
448 .Sp
449 The \fBvalue\fR argument is a colon separated list of groups. The group can be
450 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR), some other commonly used name where
451 applicable (e.g. \fBX25519\fR) or an OpenSSL \s-1OID\s0 name (e.g. \fBprime256v1\fR). Group
452 names are case sensitive. The list should be in order of preference with the
453 most preferred group first.
454 .IP "\fBCurves\fR" 4
455 .IX Item "Curves"
456 This is a synonym for the \*(L"Groups\*(R" command.
457 .IP "\fBMinProtocol\fR" 4
458 .IX Item "MinProtocol"
459 This sets the minimum supported \s-1SSL, TLS\s0 or \s-1DTLS\s0 version.
460 .Sp
461 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
462 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
463 The \s-1SSL\s0 and \s-1TLS\s0 bounds apply only to TLS-based contexts, while the \s-1DTLS\s0 bounds
464 apply only to DTLS-based contexts.
465 The command can be repeated with one instance setting a \s-1TLS\s0 bound, and the
466 other setting a \s-1DTLS\s0 bound.
467 The value \fBNone\fR applies to both types of contexts and disables the limits.
468 .IP "\fBMaxProtocol\fR" 4
469 .IX Item "MaxProtocol"
470 This sets the maximum supported \s-1SSL, TLS\s0 or \s-1DTLS\s0 version.
471 .Sp
472 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
473 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
474 The \s-1SSL\s0 and \s-1TLS\s0 bounds apply only to TLS-based contexts, while the \s-1DTLS\s0 bounds
475 apply only to DTLS-based contexts.
476 The command can be repeated with one instance setting a \s-1TLS\s0 bound, and the
477 other setting a \s-1DTLS\s0 bound.
478 The value \fBNone\fR applies to both types of contexts and disables the limits.
479 .IP "\fBProtocol\fR" 4
480 .IX Item "Protocol"
481 This can be used to enable or disable certain versions of the \s-1SSL,
482 TLS\s0 or \s-1DTLS\s0 protocol.
483 .Sp
484 The \fBvalue\fR argument is a comma separated list of supported protocols
485 to enable or disable.
486 If a protocol is preceded by \fB\-\fR that version is disabled.
487 .Sp
488 All protocol versions are enabled by default.
489 You need to disable at least one protocol version for this setting have any
490 effect.
491 Only enabling some protocol versions does not disable the other protocol
492 versions.
493 .Sp
494 Currently supported protocol values are \fBSSLv3\fR, \fBTLSv1\fR, \fBTLSv1.1\fR,
495 \&\fBTLSv1.2\fR, \fBTLSv1.3\fR, \fBDTLSv1\fR and \fBDTLSv1.2\fR.
496 The special value \fB\s-1ALL\s0\fR refers to all supported versions.
497 .Sp
498 This can't enable protocols that are disabled using \fBMinProtocol\fR
499 or \fBMaxProtocol\fR, but can disable protocols that are still allowed
500 by them.
501 .Sp
502 The \fBProtocol\fR command is fragile and deprecated; do not use it.
503 Use \fBMinProtocol\fR and \fBMaxProtocol\fR instead.
504 If you do use \fBProtocol\fR, make sure that the resulting range of enabled
505 protocols has no \*(L"holes\*(R", e.g. if \s-1TLS 1.0\s0 and \s-1TLS 1.2\s0 are both enabled, make
506 sure to also leave \s-1TLS 1.1\s0 enabled.
507 .IP "\fBOptions\fR" 4
508 .IX Item "Options"
509 The \fBvalue\fR argument is a comma separated list of various flags to set.
510 If a flag string is preceded \fB\-\fR it is disabled.
511 See the \fBSSL_CTX_set_options\fR\|(3) function for more details of
512 individual options.
513 .Sp
514 Each option is listed below. Where an operation is enabled by default
515 the \fB\-flag\fR syntax is needed to disable it.
516 .Sp
517 \&\fBSessionTicket\fR: session ticket support, enabled by default. Inverse of
518 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR: that is \fB\-SessionTicket\fR is the same as setting
519 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR.
520 .Sp
521 \&\fBCompression\fR: \s-1SSL/TLS\s0 compression support, disabled by default. Inverse
522 of \fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
523 .Sp
524 \&\fBEmptyFragments\fR: use empty fragments as a countermeasure against a
525 \&\s-1SSL 3.0/TLS 1.0\s0 protocol vulnerability affecting \s-1CBC\s0 ciphers. It
526 is set by default. Inverse of \fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0\fR.
527 .Sp
528 \&\fBBugs\fR: enable various bug workarounds. Same as \fB\s-1SSL_OP_ALL\s0\fR.
529 .Sp
530 \&\fBDHSingle\fR: enable single use \s-1DH\s0 keys, set by default. Inverse of
531 \&\fB\s-1SSL_OP_DH_SINGLE\s0\fR. Only used by servers.
532 .Sp
533 \&\fBECDHSingle\fR: enable single use \s-1ECDH\s0 keys, set by default. Inverse of
534 \&\fB\s-1SSL_OP_ECDH_SINGLE\s0\fR. Only used by servers.
535 .Sp
536 \&\fBServerPreference\fR: use server and not client preference order when
537 determining which cipher suite, signature algorithm or elliptic curve
538 to use for an incoming connection.  Equivalent to
539 \&\fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
540 .Sp
541 \&\fBPrioritizeChaCha\fR: prioritizes ChaCha ciphers when the client has a
542 ChaCha20 cipher at the top of its preference list. This usually indicates
543 a mobile client is in use. Equivalent to \fB\s-1SSL_OP_PRIORITIZE_CHACHA\s0\fR.
544 Only used by servers.
545 .Sp
546 \&\fBNoResumptionOnRenegotiation\fR: set
547 \&\fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR flag. Only used by servers.
548 .Sp
549 \&\fBNoRenegotiation\fR: disables all attempts at renegotiation in TLSv1.2 and
550 earlier, same as setting \fB\s-1SSL_OP_NO_RENEGOTIATION\s0\fR.
551 .Sp
552 \&\fBUnsafeLegacyRenegotiation\fR: permits the use of unsafe legacy renegotiation.
553 Equivalent to \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
554 .Sp
555 \&\fBUnsafeLegacyServerConnect\fR: permits the use of unsafe legacy renegotiation
556 for OpenSSL clients only. Equivalent to \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
557 Set by default.
558 .Sp
559 \&\fBEncryptThenMac\fR: use encrypt-then-mac extension, enabled by
560 default. Inverse of \fB\s-1SSL_OP_NO_ENCRYPT_THEN_MAC\s0\fR: that is,
561 \&\fB\-EncryptThenMac\fR is the same as setting \fB\s-1SSL_OP_NO_ENCRYPT_THEN_MAC\s0\fR.
562 .Sp
563 \&\fBAllowNoDHEKEX\fR: In TLSv1.3 allow a non\-(ec)dhe based key exchange mode on
564 resumption. This means that there will be no forward secrecy for the resumed
565 session. Equivalent to \fB\s-1SSL_OP_ALLOW_NO_DHE_KEX\s0\fR.
566 .Sp
567 \&\fBMiddleboxCompat\fR: If set then dummy Change Cipher Spec (\s-1CCS\s0) messages are sent
568 in TLSv1.3. This has the effect of making TLSv1.3 look more like TLSv1.2 so that
569 middleboxes that do not understand TLSv1.3 will not drop the connection. This
570 option is set by default. A future version of OpenSSL may not set this by
571 default. Equivalent to \fB\s-1SSL_OP_ENABLE_MIDDLEBOX_COMPAT\s0\fR.
572 .Sp
573 \&\fBAntiReplay\fR: If set then OpenSSL will automatically detect if a session ticket
574 has been used more than once, TLSv1.3 has been negotiated, and early data is
575 enabled on the server. A full handshake is forced if a session ticket is used a
576 second or subsequent time. This option is set by default and is only used by
577 servers. Anti-replay measures are required to comply with the TLSv1.3
578 specification. Some applications may be able to mitigate the replay risks in
579 other ways and in such cases the built-in OpenSSL functionality is not required.
580 Disabling anti-replay is equivalent to setting \fB\s-1SSL_OP_NO_ANTI_REPLAY\s0\fR.
581 .Sp
582 \&\fB\s-1KTLS\s0\fR: Enables kernel \s-1TLS\s0 if support has been compiled in, and it is supported
583 by the negotiated ciphersuites and extensions. Equivalent to
584 \&\fB\s-1SSL_OP_ENABLE_KTLS\s0\fR.
585 .IP "\fBVerifyMode\fR" 4
586 .IX Item "VerifyMode"
587 The \fBvalue\fR argument is a comma separated list of flags to set.
588 .Sp
589 \&\fBPeer\fR enables peer verification: for clients only.
590 .Sp
591 \&\fBRequest\fR requests but does not require a certificate from the client.
592 Servers only.
593 .Sp
594 \&\fBRequire\fR requests and requires a certificate from the client: an error
595 occurs if the client does not present a certificate. Servers only.
596 .Sp
597 \&\fBOnce\fR requests a certificate from a client only on the initial connection:
598 not when renegotiating. Servers only.
599 .Sp
600 \&\fBRequestPostHandshake\fR configures the connection to support requests but does
601 not require a certificate from the client post-handshake. A certificate will
602 not be requested during the initial handshake. The server application must
603 provide a mechanism to request a certificate post-handshake. Servers only.
604 TLSv1.3 only.
605 .Sp
606 \&\fBRequiresPostHandshake\fR configures the connection to support requests and
607 requires a certificate from the client post-handshake: an error occurs if the
608 client does not present a certificate. A certificate will not be requested
609 during the initial handshake. The server application must provide a mechanism
610 to request a certificate post-handshake. Servers only. TLSv1.3 only.
611 .IP "\fBClientCAFile\fR, \fBClientCAPath\fR" 4
612 .IX Item "ClientCAFile, ClientCAPath"
613 A file or directory of certificates in \s-1PEM\s0 format whose names are used as the
614 set of acceptable names for client CAs. Servers only. This option is only
615 supported if certificate operations are permitted.
616 .SH "SUPPORTED COMMAND TYPES"
617 .IX Header "SUPPORTED COMMAND TYPES"
618 The function \fBSSL_CONF_cmd_value_type()\fR currently returns one of the following
619 types:
620 .IP "\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR" 4
621 .IX Item "SSL_CONF_TYPE_UNKNOWN"
622 The \fBcmd\fR string is unrecognised, this return value can be use to flag
623 syntax errors.
624 .IP "\fB\s-1SSL_CONF_TYPE_STRING\s0\fR" 4
625 .IX Item "SSL_CONF_TYPE_STRING"
626 The value is a string without any specific structure.
627 .IP "\fB\s-1SSL_CONF_TYPE_FILE\s0\fR" 4
628 .IX Item "SSL_CONF_TYPE_FILE"
629 The value is a filename.
630 .IP "\fB\s-1SSL_CONF_TYPE_DIR\s0\fR" 4
631 .IX Item "SSL_CONF_TYPE_DIR"
632 The value is a directory name.
633 .IP "\fB\s-1SSL_CONF_TYPE_NONE\s0\fR" 4
634 .IX Item "SSL_CONF_TYPE_NONE"
635 The value string is not used e.g. a command line option which doesn't take an
636 argument.
637 .SH "NOTES"
638 .IX Header "NOTES"
639 The order of operations is significant. This can be used to set either defaults
640 or values which cannot be overridden. For example if an application calls:
641 .PP
642 .Vb 2
643 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
644 \& SSL_CONF_cmd(ctx, userparam, uservalue);
645 .Ve
646 .PP
647 it will disable SSLv3 support by default but the user can override it. If
648 however the call sequence is:
649 .PP
650 .Vb 2
651 \& SSL_CONF_cmd(ctx, userparam, uservalue);
652 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
653 .Ve
654 .PP
655 SSLv3 is \fBalways\fR disabled and attempt to override this by the user are
656 ignored.
657 .PP
658 By checking the return code of \fBSSL_CONF_cmd()\fR it is possible to query if a
659 given \fBcmd\fR is recognised, this is useful if \fBSSL_CONF_cmd()\fR values are
660 mixed with additional application specific operations.
661 .PP
662 For example an application might call \fBSSL_CONF_cmd()\fR and if it returns
663 \&\-2 (unrecognised command) continue with processing of application specific
664 commands.
665 .PP
666 Applications can also use \fBSSL_CONF_cmd()\fR to process command lines though the
667 utility function \fBSSL_CONF_cmd_argv()\fR is normally used instead. One way
668 to do this is to set the prefix to an appropriate value using
669 \&\fBSSL_CONF_CTX_set1_prefix()\fR, pass the current argument to \fBcmd\fR and the
670 following argument to \fBvalue\fR (which may be \s-1NULL\s0).
671 .PP
672 In this case if the return value is positive then it is used to skip that
673 number of arguments as they have been processed by \fBSSL_CONF_cmd()\fR. If \-2 is
674 returned then \fBcmd\fR is not recognised and application specific arguments
675 can be checked instead. If \-3 is returned a required argument is missing
676 and an error is indicated. If 0 is returned some other error occurred and
677 this can be reported back to the user.
678 .PP
679 The function \fBSSL_CONF_cmd_value_type()\fR can be used by applications to
680 check for the existence of a command or to perform additional syntax
681 checking or translation of the command value. For example if the return
682 value is \fB\s-1SSL_CONF_TYPE_FILE\s0\fR an application could translate a relative
683 pathname to an absolute pathname.
684 .SH "RETURN VALUES"
685 .IX Header "RETURN VALUES"
686 \&\fBSSL_CONF_cmd()\fR returns 1 if the value of \fBcmd\fR is recognised and \fBvalue\fR is
687 \&\fB\s-1NOT\s0\fR used and 2 if both \fBcmd\fR and \fBvalue\fR are used. In other words it
688 returns the number of arguments processed. This is useful when processing
689 command lines.
690 .PP
691 A return value of \-2 means \fBcmd\fR is not recognised.
692 .PP
693 A return value of \-3 means \fBcmd\fR is recognised and the command requires a
694 value but \fBvalue\fR is \s-1NULL.\s0
695 .PP
696 A return code of 0 indicates that both \fBcmd\fR and \fBvalue\fR are valid but an
697 error occurred attempting to perform the operation: for example due to an
698 error in the syntax of \fBvalue\fR in this case the error queue may provide
699 additional information.
700 .SH "EXAMPLES"
701 .IX Header "EXAMPLES"
702 Set supported signature algorithms:
703 .PP
704 .Vb 1
705 \& SSL_CONF_cmd(ctx, "SignatureAlgorithms", "ECDSA+SHA256:RSA+SHA256:DSA+SHA256");
706 .Ve
707 .PP
708 There are various ways to select the supported protocols.
709 .PP
710 This set the minimum protocol version to TLSv1, and so disables SSLv3.
711 This is the recommended way to disable protocols.
712 .PP
713 .Vb 1
714 \& SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1");
715 .Ve
716 .PP
717 The following also disables SSLv3:
718 .PP
719 .Vb 1
720 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
721 .Ve
722 .PP
723 The following will first enable all protocols, and then disable
724 SSLv3.
725 If no protocol versions were disabled before this has the same effect as
726 \&\*(L"\-SSLv3\*(R", but if some versions were disables this will re-enable them before
727 disabling SSLv3.
728 .PP
729 .Vb 1
730 \& SSL_CONF_cmd(ctx, "Protocol", "ALL,\-SSLv3");
731 .Ve
732 .PP
733 Only enable TLSv1.2:
734 .PP
735 .Vb 2
736 \& SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1.2");
737 \& SSL_CONF_cmd(ctx, "MaxProtocol", "TLSv1.2");
738 .Ve
739 .PP
740 This also only enables TLSv1.2:
741 .PP
742 .Vb 1
743 \& SSL_CONF_cmd(ctx, "Protocol", "\-ALL,TLSv1.2");
744 .Ve
745 .PP
746 Disable \s-1TLS\s0 session tickets:
747 .PP
748 .Vb 1
749 \& SSL_CONF_cmd(ctx, "Options", "\-SessionTicket");
750 .Ve
751 .PP
752 Enable compression:
753 .PP
754 .Vb 1
755 \& SSL_CONF_cmd(ctx, "Options", "Compression");
756 .Ve
757 .PP
758 Set supported curves to P\-256, P\-384:
759 .PP
760 .Vb 1
761 \& SSL_CONF_cmd(ctx, "Curves", "P\-256:P\-384");
762 .Ve
763 .SH "SEE ALSO"
764 .IX Header "SEE ALSO"
765 \&\fBSSL_CONF_CTX_new\fR\|(3),
766 \&\fBSSL_CONF_CTX_set_flags\fR\|(3),
767 \&\fBSSL_CONF_CTX_set1_prefix\fR\|(3),
768 \&\fBSSL_CONF_CTX_set_ssl_ctx\fR\|(3),
769 \&\fBSSL_CONF_cmd_argv\fR\|(3),
770 \&\fBSSL_CTX_set_options\fR\|(3)
771 .SH "HISTORY"
772 .IX Header "HISTORY"
773 The \fBSSL_CONF_cmd()\fR function was added in OpenSSL 1.0.2.
774 .PP
775 The \fB\s-1SSL_OP_NO_SSL2\s0\fR option doesn't have effect since 1.1.0, but the macro
776 is retained for backwards compatibility.
777 .PP
778 The \fB\s-1SSL_CONF_TYPE_NONE\s0\fR was added in OpenSSL 1.1.0. In earlier versions of
779 OpenSSL passing a command which didn't take an argument would return
780 \&\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR.
781 .PP
782 \&\fBMinProtocol\fR and \fBMaxProtocol\fR where added in OpenSSL 1.1.0.
783 .PP
784 \&\fBAllowNoDHEKEX\fR and \fBPrioritizeChaCha\fR were added in OpenSSL 1.1.1.
785 .SH "COPYRIGHT"
786 .IX Header "COPYRIGHT"
787 Copyright 2012\-2022 The OpenSSL Project Authors. All Rights Reserved.
788 .PP
789 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
790 this file except in compliance with the License.  You can obtain a copy
791 in the file \s-1LICENSE\s0 in the source distribution or at
792 <https://www.openssl.org/source/license.html>.