]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libssl/man/SSL_CONF_cmd.3
Merge OpenSSL 1.0.2n.
[FreeBSD/FreeBSD.git] / secure / lib / libssl / man / SSL_CONF_cmd.3
1 .\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.35)
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 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
67 .\"
68 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
70 .    \" fudge factors for nroff and troff
71 .if n \{\
72 .    ds #H 0
73 .    ds #V .8m
74 .    ds #F .3m
75 .    ds #[ \f1
76 .    ds #] \fP
77 .\}
78 .if t \{\
79 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80 .    ds #V .6m
81 .    ds #F 0
82 .    ds #[ \&
83 .    ds #] \&
84 .\}
85 .    \" simple accents for nroff and troff
86 .if n \{\
87 .    ds ' \&
88 .    ds ` \&
89 .    ds ^ \&
90 .    ds , \&
91 .    ds ~ ~
92 .    ds /
93 .\}
94 .if t \{\
95 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101 .\}
102 .    \" troff and (daisy-wheel) nroff accents
103 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110 .ds ae a\h'-(\w'a'u*4/10)'e
111 .ds Ae A\h'-(\w'A'u*4/10)'E
112 .    \" corrections for vroff
113 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115 .    \" for low resolution devices (crt and lpr)
116 .if \n(.H>23 .if \n(.V>19 \
117 \{\
118 .    ds : e
119 .    ds 8 ss
120 .    ds o a
121 .    ds d- d\h'-1'\(ga
122 .    ds D- D\h'-1'\(hy
123 .    ds th \o'bp'
124 .    ds Th \o'LP'
125 .    ds ae ae
126 .    ds Ae AE
127 .\}
128 .rm #[ #] #H #V #F C
129 .\" ========================================================================
130 .\"
131 .IX Title "SSL_CONF_cmd 3"
132 .TH SSL_CONF_cmd 3 "2017-12-07" "1.0.2n" "OpenSSL"
133 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 SSL_CONF_cmd \- send configuration command
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 .Vb 1
142 \& #include <openssl/ssl.h>
143 \&
144 \& int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value);
145 \& int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd);
146 \& int SSL_CONF_finish(SSL_CONF_CTX *cctx);
147 .Ve
148 .SH "DESCRIPTION"
149 .IX Header "DESCRIPTION"
150 The function \fISSL_CONF_cmd()\fR performs configuration operation \fBcmd\fR with
151 optional parameter \fBvalue\fR on \fBctx\fR. Its purpose is to simplify application
152 configuration of \fB\s-1SSL_CTX\s0\fR or \fB\s-1SSL\s0\fR structures by providing a common
153 framework for command line options or configuration files.
154 .PP
155 \&\fISSL_CONF_cmd_value_type()\fR returns the type of value that \fBcmd\fR refers to.
156 .PP
157 The function \fISSL_CONF_finish()\fR must be called after all configuration
158 operations have been completed. It is used to finalise any operations
159 or to process defaults.
160 .SH "SUPPORTED COMMAND LINE COMMANDS"
161 .IX Header "SUPPORTED COMMAND LINE COMMANDS"
162 Currently supported \fBcmd\fR names for command lines (i.e. when the
163 flag \fB\s-1SSL_CONF_CMDLINE\s0\fR is set) are listed below. Note: all \fBcmd\fR names
164 are case sensitive. Unless otherwise stated commands can be used by
165 both clients and servers and the \fBvalue\fR parameter is not used. The default
166 prefix for command line commands is \fB\-\fR and that is reflected below.
167 .IP "\fB\-sigalgs\fR" 4
168 .IX Item "-sigalgs"
169 This sets the supported signature algorithms for \s-1TLS\s0 v1.2. 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. \fBalgorithm\fR
175 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
176 \&\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.
177 Note: algorithm and hash names are case sensitive.
178 .Sp
179 If this option is not set then all signature algorithms supported by the
180 OpenSSL library are permissible.
181 .IP "\fB\-client_sigalgs\fR" 4
182 .IX Item "-client_sigalgs"
183 This sets the supported signature algorithms associated with client
184 authentication for \s-1TLS\s0 v1.2. For servers the value is used in the supported
185 signature algorithms field of a certificate request. For clients it is
186 used to determine which signature algorithm to with the client certificate.
187 If a server does not request a certificate this option has no effect.
188 .Sp
189 The syntax of \fBvalue\fR is identical to \fB\-sigalgs\fR. If not set then
190 the value set for \fB\-sigalgs\fR will be used instead.
191 .IP "\fB\-curves\fR" 4
192 .IX Item "-curves"
193 This sets the supported elliptic curves. For clients the curves are
194 sent using the supported curves extension. For servers it is used
195 to determine which curve to use. This setting affects curves used for both
196 signatures and key exchange, if applicable.
197 .Sp
198 The \fBvalue\fR argument is a colon separated list of curves. The curve can be
199 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name (e.g
200 \&\fBprime256v1\fR). Curve names are case sensitive.
201 .IP "\fB\-named_curve\fR" 4
202 .IX Item "-named_curve"
203 This sets the temporary curve used for ephemeral \s-1ECDH\s0 modes. Only used by
204 servers
205 .Sp
206 The \fBvalue\fR argument is a curve name or the special value \fBauto\fR which
207 picks an appropriate curve based on client and server preferences. The curve
208 can be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name
209 (e.g \fBprime256v1\fR). Curve names are case sensitive.
210 .IP "\fB\-cipher\fR" 4
211 .IX Item "-cipher"
212 Sets the cipher suite list to \fBvalue\fR. Note: syntax checking of \fBvalue\fR is
213 currently not performed unless a \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR structure is
214 associated with \fBcctx\fR.
215 .IP "\fB\-cert\fR" 4
216 .IX Item "-cert"
217 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
218 context. It currently uses \fISSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
219 structure is set or \fISSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
220 structure is set. This option is only supported if certificate operations
221 are permitted.
222 .IP "\fB\-key\fR" 4
223 .IX Item "-key"
224 Attempts to use the file \fBvalue\fR as the private key for the appropriate
225 context. This option is only supported if certificate operations
226 are permitted. Note: if no \fB\-key\fR option is set then a private key is
227 not loaded: it does not currently use the \fB\-cert\fR file.
228 .IP "\fB\-dhparam\fR" 4
229 .IX Item "-dhparam"
230 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
231 the appropriate context. This option is only supported if certificate
232 operations are permitted.
233 .IP "\fB\-no_ssl2\fR, \fB\-no_ssl3\fR, \fB\-no_tls1\fR, \fB\-no_tls1_1\fR, \fB\-no_tls1_2\fR" 4
234 .IX Item "-no_ssl2, -no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2"
235 Disables protocol support for SSLv2, SSLv3, TLSv1.0, TLSv1.1 or TLSv1.2
236 by setting the corresponding options \fBSSL_OP_NO_SSLv2\fR, \fBSSL_OP_NO_SSLv3\fR,
237 \&\fBSSL_OP_NO_TLSv1\fR, \fBSSL_OP_NO_TLSv1_1\fR and \fBSSL_OP_NO_TLSv1_2\fR respectively.
238 .IP "\fB\-bugs\fR" 4
239 .IX Item "-bugs"
240 Various bug workarounds are set, same as setting \fB\s-1SSL_OP_ALL\s0\fR.
241 .IP "\fB\-no_comp\fR" 4
242 .IX Item "-no_comp"
243 Disables support for \s-1SSL/TLS\s0 compression, same as setting \fB\s-1SSL_OP_NO_COMPRESS\s0\fR.
244 .IP "\fB\-no_ticket\fR" 4
245 .IX Item "-no_ticket"
246 Disables support for session tickets, same as setting \fB\s-1SSL_OP_NO_TICKET\s0\fR.
247 .IP "\fB\-serverpref\fR" 4
248 .IX Item "-serverpref"
249 Use server and not client preference order when determining which cipher suite,
250 signature algorithm or elliptic curve to use for an incoming connection.
251 Equivalent to \fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
252 .IP "\fB\-no_resumption_on_reneg\fR" 4
253 .IX Item "-no_resumption_on_reneg"
254 set \s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0 flag. Only used by servers.
255 .IP "\fB\-legacyrenegotiation\fR" 4
256 .IX Item "-legacyrenegotiation"
257 permits the use of unsafe legacy renegotiation. Equivalent to setting
258 \&\fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
259 .IP "\fB\-legacy_server_connect\fR, \fB\-no_legacy_server_connect\fR" 4
260 .IX Item "-legacy_server_connect, -no_legacy_server_connect"
261 permits or prohibits the use of unsafe legacy renegotiation for OpenSSL
262 clients only. Equivalent to setting or clearing \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
263 Set by default.
264 .IP "\fB\-strict\fR" 4
265 .IX Item "-strict"
266 enables strict mode protocol handling. Equivalent to setting
267 \&\fB\s-1SSL_CERT_FLAG_TLS_STRICT\s0\fR.
268 .IP "\fB\-debug_broken_protocol\fR" 4
269 .IX Item "-debug_broken_protocol"
270 disables various checks and permits several kinds of broken protocol behaviour
271 for testing purposes: it should \fB\s-1NEVER\s0\fR be used in anything other than a test
272 environment. Only supported if OpenSSL is configured with
273 \&\fB\-DOPENSSL_SSL_DEBUG_BROKEN_PROTOCOL\fR.
274 .SH "SUPPORTED CONFIGURATION FILE COMMANDS"
275 .IX Header "SUPPORTED CONFIGURATION FILE COMMANDS"
276 Currently supported \fBcmd\fR names for configuration files (i.e. when the
277 flag \fB\s-1SSL_CONF_FLAG_FILE\s0\fR is set) are listed below. All configuration file
278 \&\fBcmd\fR names and are case insensitive so \fBsignaturealgorithms\fR is recognised
279 as well as \fBSignatureAlgorithms\fR. Unless otherwise stated the \fBvalue\fR names
280 are also case insensitive.
281 .PP
282 Note: the command prefix (if set) alters the recognised \fBcmd\fR values.
283 .IP "\fBCipherString\fR" 4
284 .IX Item "CipherString"
285 Sets the cipher suite list to \fBvalue\fR. Note: syntax checking of \fBvalue\fR is
286 currently not performed unless an \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR structure is
287 associated with \fBcctx\fR.
288 .IP "\fBCertificate\fR" 4
289 .IX Item "Certificate"
290 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
291 context. It currently uses \fISSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
292 structure is set or \fISSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
293 structure is set. This option is only supported if certificate operations
294 are permitted.
295 .IP "\fBPrivateKey\fR" 4
296 .IX Item "PrivateKey"
297 Attempts to use the file \fBvalue\fR as the private key for the appropriate
298 context. This option is only supported if certificate operations
299 are permitted. Note: if no \fB\-key\fR option is set then a private key is
300 not loaded: it does not currently use the \fBCertificate\fR file.
301 .IP "\fBServerInfoFile\fR" 4
302 .IX Item "ServerInfoFile"
303 Attempts to use the file \fBvalue\fR in the \*(L"serverinfo\*(R" extension using the
304 function SSL_CTX_use_serverinfo_file.
305 .IP "\fBDHParameters\fR" 4
306 .IX Item "DHParameters"
307 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
308 the appropriate context. This option is only supported if certificate
309 operations are permitted.
310 .IP "\fBSignatureAlgorithms\fR" 4
311 .IX Item "SignatureAlgorithms"
312 This sets the supported signature algorithms for \s-1TLS\s0 v1.2. For clients this
313 value is used directly for the supported signature algorithms extension. For
314 servers it is used to determine which signature algorithms to support.
315 .Sp
316 The \fBvalue\fR argument should be a colon separated list of signature algorithms
317 in order of decreasing preference of the form \fBalgorithm+hash\fR. \fBalgorithm\fR
318 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
319 \&\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.
320 Note: algorithm and hash names are case sensitive.
321 .Sp
322 If this option is not set then all signature algorithms supported by the
323 OpenSSL library are permissible.
324 .IP "\fBClientSignatureAlgorithms\fR" 4
325 .IX Item "ClientSignatureAlgorithms"
326 This sets the supported signature algorithms associated with client
327 authentication for \s-1TLS\s0 v1.2. For servers the value is used in the supported
328 signature algorithms field of a certificate request. For clients it is
329 used to determine which signature algorithm to with the client certificate.
330 .Sp
331 The syntax of \fBvalue\fR is identical to \fBSignatureAlgorithms\fR. If not set then
332 the value set for \fBSignatureAlgorithms\fR will be used instead.
333 .IP "\fBCurves\fR" 4
334 .IX Item "Curves"
335 This sets the supported elliptic curves. For clients the curves are
336 sent using the supported curves extension. For servers it is used
337 to determine which curve to use. This setting affects curves used for both
338 signatures and key exchange, if applicable.
339 .Sp
340 The \fBvalue\fR argument is a colon separated list of curves. The curve can be
341 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name (e.g
342 \&\fBprime256v1\fR). Curve names are case sensitive.
343 .IP "\fBECDHParameters\fR" 4
344 .IX Item "ECDHParameters"
345 This sets the temporary curve used for ephemeral \s-1ECDH\s0 modes. Only used by
346 servers
347 .Sp
348 The \fBvalue\fR argument is a curve name or the special value \fBAutomatic\fR which
349 picks an appropriate curve based on client and server preferences. The curve
350 can be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name
351 (e.g \fBprime256v1\fR). Curve names are case sensitive.
352 .IP "\fBProtocol\fR" 4
353 .IX Item "Protocol"
354 The supported versions of the \s-1SSL\s0 or \s-1TLS\s0 protocol.
355 .Sp
356 The \fBvalue\fR argument is a comma separated list of supported protocols to
357 enable or disable. If an protocol is preceded by \fB\-\fR that version is disabled.
358 Currently supported protocol values are \fBSSLv2\fR, \fBSSLv3\fR, \fBTLSv1\fR,
359 \&\fBTLSv1.1\fR and \fBTLSv1.2\fR.
360 All protocol versions other than \fBSSLv2\fR are enabled by default.
361 To avoid inadvertent enabling of \fBSSLv2\fR, when SSLv2 is disabled, it is not
362 possible to enable it via the \fBProtocol\fR command.
363 .IP "\fBOptions\fR" 4
364 .IX Item "Options"
365 The \fBvalue\fR argument is a comma separated list of various flags to set.
366 If a flag string is preceded \fB\-\fR it is disabled. See the
367 \&\fBSSL_CTX_set_options\fR function for more details of individual options.
368 .Sp
369 Each option is listed below. Where an operation is enabled by default
370 the \fB\-flag\fR syntax is needed to disable it.
371 .Sp
372 \&\fBSessionTicket\fR: session ticket support, enabled by default. Inverse of
373 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR: that is \fB\-SessionTicket\fR is the same as setting
374 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR.
375 .Sp
376 \&\fBCompression\fR: \s-1SSL/TLS\s0 compression support, enabled by default. Inverse
377 of \fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
378 .Sp
379 \&\fBEmptyFragments\fR: use empty fragments as a countermeasure against a
380 \&\s-1SSL 3.0/TLS 1.0\s0 protocol vulnerability affecting \s-1CBC\s0 ciphers. It
381 is set by default. Inverse of \fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0\fR.
382 .Sp
383 \&\fBBugs\fR: enable various bug workarounds. Same as \fB\s-1SSL_OP_ALL\s0\fR.
384 .Sp
385 \&\fBDHSingle\fR: enable single use \s-1DH\s0 keys, set by default. Inverse of
386 \&\fB\s-1SSL_OP_DH_SINGLE\s0\fR. Only used by servers.
387 .Sp
388 \&\fBECDHSingle\fR enable single use \s-1ECDH\s0 keys, set by default. Inverse of
389 \&\fB\s-1SSL_OP_ECDH_SINGLE\s0\fR. Only used by servers.
390 .Sp
391 \&\fBServerPreference\fR use server and not client preference order when
392 determining which cipher suite, signature algorithm or elliptic curve
393 to use for an incoming connection.  Equivalent to
394 \&\fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
395 .Sp
396 \&\fBNoResumptionOnRenegotiation\fR set
397 \&\fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR flag. Only used by servers.
398 .Sp
399 \&\fBUnsafeLegacyRenegotiation\fR permits the use of unsafe legacy renegotiation.
400 Equivalent to \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
401 .Sp
402 \&\fBUnsafeLegacyServerConnect\fR permits the use of unsafe legacy renegotiation
403 for OpenSSL clients only. Equivalent to \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
404 Set by default.
405 .SH "SUPPORTED COMMAND TYPES"
406 .IX Header "SUPPORTED COMMAND TYPES"
407 The function \fISSL_CONF_cmd_value_type()\fR currently returns one of the following
408 types:
409 .IP "\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR" 4
410 .IX Item "SSL_CONF_TYPE_UNKNOWN"
411 The \fBcmd\fR string is unrecognised, this return value can be use to flag
412 syntax errors.
413 .IP "\fB\s-1SSL_CONF_TYPE_STRING\s0\fR" 4
414 .IX Item "SSL_CONF_TYPE_STRING"
415 The value is a string without any specific structure.
416 .IP "\fB\s-1SSL_CONF_TYPE_FILE\s0\fR" 4
417 .IX Item "SSL_CONF_TYPE_FILE"
418 The value is a file name.
419 .IP "\fB\s-1SSL_CONF_TYPE_DIR\s0\fR" 4
420 .IX Item "SSL_CONF_TYPE_DIR"
421 The value is a directory name.
422 .SH "NOTES"
423 .IX Header "NOTES"
424 The order of operations is significant. This can be used to set either defaults
425 or values which cannot be overridden. For example if an application calls:
426 .PP
427 .Vb 2
428 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
429 \& SSL_CONF_cmd(ctx, userparam, uservalue);
430 .Ve
431 .PP
432 it will disable SSLv3 support by default but the user can override it. If
433 however the call sequence is:
434 .PP
435 .Vb 2
436 \& SSL_CONF_cmd(ctx, userparam, uservalue);
437 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
438 .Ve
439 .PP
440 then SSLv3 is \fBalways\fR disabled and attempt to override this by the user are
441 ignored.
442 .PP
443 By checking the return code of \fISSL_CTX_cmd()\fR it is possible to query if a
444 given \fBcmd\fR is recognised, this is useful is \fISSL_CTX_cmd()\fR values are
445 mixed with additional application specific operations.
446 .PP
447 For example an application might call \fISSL_CTX_cmd()\fR and if it returns
448 \&\-2 (unrecognised command) continue with processing of application specific
449 commands.
450 .PP
451 Applications can also use \fISSL_CTX_cmd()\fR to process command lines though the
452 utility function \fISSL_CTX_cmd_argv()\fR is normally used instead. One way
453 to do this is to set the prefix to an appropriate value using
454 \&\fISSL_CONF_CTX_set1_prefix()\fR, pass the current argument to \fBcmd\fR and the
455 following argument to \fBvalue\fR (which may be \s-1NULL\s0).
456 .PP
457 In this case if the return value is positive then it is used to skip that
458 number of arguments as they have been processed by \fISSL_CTX_cmd()\fR. If \-2 is
459 returned then \fBcmd\fR is not recognised and application specific arguments
460 can be checked instead. If \-3 is returned a required argument is missing
461 and an error is indicated. If 0 is returned some other error occurred and
462 this can be reported back to the user.
463 .PP
464 The function \fISSL_CONF_cmd_value_type()\fR can be used by applications to
465 check for the existence of a command or to perform additional syntax
466 checking or translation of the command value. For example if the return
467 value is \fB\s-1SSL_CONF_TYPE_FILE\s0\fR an application could translate a relative
468 pathname to an absolute pathname.
469 .SH "EXAMPLES"
470 .IX Header "EXAMPLES"
471 Set supported signature algorithms:
472 .PP
473 .Vb 1
474 \& SSL_CONF_cmd(ctx, "SignatureAlgorithms", "ECDSA+SHA256:RSA+SHA256:DSA+SHA256");
475 .Ve
476 .PP
477 Enable all protocols except SSLv3 and SSLv2:
478 .PP
479 .Vb 1
480 \& SSL_CONF_cmd(ctx, "Protocol", "ALL,\-SSLv3,\-SSLv2");
481 .Ve
482 .PP
483 Only enable TLSv1.2:
484 .PP
485 .Vb 1
486 \& SSL_CONF_cmd(ctx, "Protocol", "\-ALL,TLSv1.2");
487 .Ve
488 .PP
489 Disable \s-1TLS\s0 session tickets:
490 .PP
491 .Vb 1
492 \& SSL_CONF_cmd(ctx, "Options", "\-SessionTicket");
493 .Ve
494 .PP
495 Set supported curves to P\-256, P\-384:
496 .PP
497 .Vb 1
498 \& SSL_CONF_cmd(ctx, "Curves", "P\-256:P\-384");
499 .Ve
500 .PP
501 Set automatic support for any elliptic curve for key exchange:
502 .PP
503 .Vb 1
504 \& SSL_CONF_cmd(ctx, "ECDHParameters", "Automatic");
505 .Ve
506 .SH "RETURN VALUES"
507 .IX Header "RETURN VALUES"
508 \&\fISSL_CONF_cmd()\fR returns 1 if the value of \fBcmd\fR is recognised and \fBvalue\fR is
509 \&\fB\s-1NOT\s0\fR used and 2 if both \fBcmd\fR and \fBvalue\fR are used. In other words it
510 returns the number of arguments processed. This is useful when processing
511 command lines.
512 .PP
513 A return value of \-2 means \fBcmd\fR is not recognised.
514 .PP
515 A return value of \-3 means \fBcmd\fR is recognised and the command requires a
516 value but \fBvalue\fR is \s-1NULL.\s0
517 .PP
518 A return code of 0 indicates that both \fBcmd\fR and \fBvalue\fR are valid but an
519 error occurred attempting to perform the operation: for example due to an
520 error in the syntax of \fBvalue\fR in this case the error queue may provide
521 additional information.
522 .PP
523 \&\fISSL_CONF_finish()\fR returns 1 for success and 0 for failure.
524 .SH "SEE ALSO"
525 .IX Header "SEE ALSO"
526 \&\fISSL_CONF_CTX_new\fR\|(3),
527 \&\fISSL_CONF_CTX_set_flags\fR\|(3),
528 \&\fISSL_CONF_CTX_set1_prefix\fR\|(3),
529 \&\fISSL_CONF_CTX_set_ssl_ctx\fR\|(3),
530 \&\fISSL_CONF_cmd_argv\fR\|(3)
531 .SH "HISTORY"
532 .IX Header "HISTORY"
533 \&\fISSL_CONF_cmd()\fR was first added to OpenSSL 1.0.2