Update files for OpenSSL-1.0.2h import.
[dragonfly.git] / secure / lib / libssl / man / SSL_CONF_cmd.3
1 .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
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 turned on, 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 "2016-05-03" "1.0.2h" "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 \- 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 \& int SSL_CONF_finish(SSL_CONF_CTX *cctx);
151 .Ve
152 .SH "DESCRIPTION"
153 .IX Header "DESCRIPTION"
154 The function \fISSL_CONF_cmd()\fR performs configuration operation \fBcmd\fR with
155 optional parameter \fBvalue\fR on \fBctx\fR. Its purpose is to simplify application
156 configuration of \fB\s-1SSL_CTX\s0\fR or \fB\s-1SSL\s0\fR structures by providing a common
157 framework for command line options or configuration files.
158 .PP
159 \&\fISSL_CONF_cmd_value_type()\fR returns the type of value that \fBcmd\fR refers to.
160 .PP
161 The function \fISSL_CONF_finish()\fR must be called after all configuration
162 operations have been completed. It is used to finalise any operations
163 or to process defaults.
164 .SH "SUPPORTED COMMAND LINE COMMANDS"
165 .IX Header "SUPPORTED COMMAND LINE COMMANDS"
166 Currently supported \fBcmd\fR names for command lines (i.e. when the
167 flag \fB\s-1SSL_CONF_CMDLINE\s0\fR is set) are listed below. Note: all \fBcmd\fR names
168 are case sensitive. Unless otherwise stated commands can be used by
169 both clients and servers and the \fBvalue\fR parameter is not used. The default
170 prefix for command line commands is \fB\-\fR and that is reflected below.
171 .IP "\fB\-sigalgs\fR" 4
172 .IX Item "-sigalgs"
173 This sets the supported signature algorithms for \s-1TLS\s0 v1.2. For clients this
174 value is used directly for the supported signature algorithms extension. For
175 servers it is used to determine which signature algorithms to support.
176 .Sp
177 The \fBvalue\fR argument should be a colon separated list of signature algorithms
178 in order of decreasing preference of the form \fBalgorithm+hash\fR. \fBalgorithm\fR
179 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
180 \&\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.
181 Note: algorithm and hash names are case sensitive.
182 .Sp
183 If this option is not set then all signature algorithms supported by the
184 OpenSSL library are permissible.
185 .IP "\fB\-client_sigalgs\fR" 4
186 .IX Item "-client_sigalgs"
187 This sets the supported signature algorithms associated with client
188 authentication for \s-1TLS\s0 v1.2. For servers the value is used in the supported
189 signature algorithms field of a certificate request. For clients it is
190 used to determine which signature algorithm to with the client certificate.
191 If a server does not request a certificate this option has no effect.
192 .Sp
193 The syntax of \fBvalue\fR is identical to \fB\-sigalgs\fR. If not set then
194 the value set for \fB\-sigalgs\fR will be used instead.
195 .IP "\fB\-curves\fR" 4
196 .IX Item "-curves"
197 This sets the supported elliptic curves. For clients the curves are
198 sent using the supported curves extension. For servers it is used
199 to determine which curve to use. This setting affects curves used for both
200 signatures and key exchange, if applicable.
201 .Sp
202 The \fBvalue\fR argument is a colon separated list of curves. The curve can be
203 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name (e.g
204 \&\fBprime256v1\fR). Curve names are case sensitive.
205 .IP "\fB\-named_curve\fR" 4
206 .IX Item "-named_curve"
207 This sets the temporary curve used for ephemeral \s-1ECDH\s0 modes. Only used by
208 servers
209 .Sp
210 The \fBvalue\fR argument is a curve name or the special value \fBauto\fR which
211 picks an appropriate curve based on client and server preferences. The curve
212 can be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name
213 (e.g \fBprime256v1\fR). Curve names are case sensitive.
214 .IP "\fB\-cipher\fR" 4
215 .IX Item "-cipher"
216 Sets the cipher suite list to \fBvalue\fR. Note: syntax checking of \fBvalue\fR is
217 currently not performed unless a \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR structure is
218 associated with \fBcctx\fR.
219 .IP "\fB\-cert\fR" 4
220 .IX Item "-cert"
221 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
222 context. It currently uses \fISSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
223 structure is set or \fISSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
224 structure is set. This option is only supported if certificate operations
225 are permitted.
226 .IP "\fB\-key\fR" 4
227 .IX Item "-key"
228 Attempts to use the file \fBvalue\fR as the private key for the appropriate
229 context. This option is only supported if certificate operations
230 are permitted. Note: if no \fB\-key\fR option is set then a private key is
231 not loaded: it does not currently use the \fB\-cert\fR file.
232 .IP "\fB\-dhparam\fR" 4
233 .IX Item "-dhparam"
234 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
235 the appropriate context. This option is only supported if certificate
236 operations are permitted.
237 .IP "\fB\-no_ssl2\fR, \fB\-no_ssl3\fR, \fB\-no_tls1\fR, \fB\-no_tls1_1\fR, \fB\-no_tls1_2\fR" 4
238 .IX Item "-no_ssl2, -no_ssl3, -no_tls1, -no_tls1_1, -no_tls1_2"
239 Disables protocol support for SSLv2, SSLv3, TLSv1.0, TLSv1.1 or TLSv1.2
240 by setting the corresponding options \fBSSL_OP_NO_SSLv2\fR, \fBSSL_OP_NO_SSLv3\fR,
241 \&\fBSSL_OP_NO_TLSv1\fR, \fBSSL_OP_NO_TLSv1_1\fR and \fBSSL_OP_NO_TLSv1_2\fR respectively.
242 .IP "\fB\-bugs\fR" 4
243 .IX Item "-bugs"
244 Various bug workarounds are set, same as setting \fB\s-1SSL_OP_ALL\s0\fR.
245 .IP "\fB\-no_comp\fR" 4
246 .IX Item "-no_comp"
247 Disables support for \s-1SSL/TLS\s0 compression, same as setting \fB\s-1SSL_OP_NO_COMPRESS\s0\fR.
248 .IP "\fB\-no_ticket\fR" 4
249 .IX Item "-no_ticket"
250 Disables support for session tickets, same as setting \fB\s-1SSL_OP_NO_TICKET\s0\fR.
251 .IP "\fB\-serverpref\fR" 4
252 .IX Item "-serverpref"
253 Use server and not client preference order when determining which cipher suite,
254 signature algorithm or elliptic curve to use for an incoming connection.
255 Equivalent to \fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
256 .IP "\fB\-no_resumption_on_reneg\fR" 4
257 .IX Item "-no_resumption_on_reneg"
258 set \s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0 flag. Only used by servers.
259 .IP "\fB\-legacyrenegotiation\fR" 4
260 .IX Item "-legacyrenegotiation"
261 permits the use of unsafe legacy renegotiation. Equivalent to setting
262 \&\fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
263 .IP "\fB\-legacy_server_connect\fR, \fB\-no_legacy_server_connect\fR" 4
264 .IX Item "-legacy_server_connect, -no_legacy_server_connect"
265 permits or prohibits the use of unsafe legacy renegotiation for OpenSSL
266 clients only. Equivalent to setting or clearing \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
267 Set by default.
268 .IP "\fB\-strict\fR" 4
269 .IX Item "-strict"
270 enables strict mode protocol handling. Equivalent to setting
271 \&\fB\s-1SSL_CERT_FLAG_TLS_STRICT\s0\fR.
272 .IP "\fB\-debug_broken_protocol\fR" 4
273 .IX Item "-debug_broken_protocol"
274 disables various checks and permits several kinds of broken protocol behaviour
275 for testing purposes: it should \fB\s-1NEVER\s0\fR be used in anything other than a test
276 environment. Only supported if OpenSSL is configured with
277 \&\fB\-DOPENSSL_SSL_DEBUG_BROKEN_PROTOCOL\fR.
278 .SH "SUPPORTED CONFIGURATION FILE COMMANDS"
279 .IX Header "SUPPORTED CONFIGURATION FILE COMMANDS"
280 Currently supported \fBcmd\fR names for configuration files (i.e. when the
281 flag \fB\s-1SSL_CONF_FLAG_FILE\s0\fR is set) are listed below. All configuration file
282 \&\fBcmd\fR names and are case insensitive so \fBsignaturealgorithms\fR is recognised
283 as well as \fBSignatureAlgorithms\fR. Unless otherwise stated the \fBvalue\fR names
284 are also case insensitive.
285 .PP
286 Note: the command prefix (if set) alters the recognised \fBcmd\fR values.
287 .IP "\fBCipherString\fR" 4
288 .IX Item "CipherString"
289 Sets the cipher suite list to \fBvalue\fR. Note: syntax checking of \fBvalue\fR is
290 currently not performed unless an \fB\s-1SSL\s0\fR or \fB\s-1SSL_CTX\s0\fR structure is
291 associated with \fBcctx\fR.
292 .IP "\fBCertificate\fR" 4
293 .IX Item "Certificate"
294 Attempts to use the file \fBvalue\fR as the certificate for the appropriate
295 context. It currently uses \fISSL_CTX_use_certificate_chain_file()\fR if an \fB\s-1SSL_CTX\s0\fR
296 structure is set or \fISSL_use_certificate_file()\fR with filetype \s-1PEM\s0 if an \fB\s-1SSL\s0\fR
297 structure is set. This option is only supported if certificate operations
298 are permitted.
299 .IP "\fBPrivateKey\fR" 4
300 .IX Item "PrivateKey"
301 Attempts to use the file \fBvalue\fR as the private key for the appropriate
302 context. This option is only supported if certificate operations
303 are permitted. Note: if no \fB\-key\fR option is set then a private key is
304 not loaded: it does not currently use the \fBCertificate\fR file.
305 .IP "\fBServerInfoFile\fR" 4
306 .IX Item "ServerInfoFile"
307 Attempts to use the file \fBvalue\fR in the \*(L"serverinfo\*(R" extension using the
308 function SSL_CTX_use_serverinfo_file.
309 .IP "\fBDHParameters\fR" 4
310 .IX Item "DHParameters"
311 Attempts to use the file \fBvalue\fR as the set of temporary \s-1DH\s0 parameters for
312 the appropriate context. This option is only supported if certificate
313 operations are permitted.
314 .IP "\fBSignatureAlgorithms\fR" 4
315 .IX Item "SignatureAlgorithms"
316 This sets the supported signature algorithms for \s-1TLS\s0 v1.2. For clients this
317 value is used directly for the supported signature algorithms extension. For
318 servers it is used to determine which signature algorithms to support.
319 .Sp
320 The \fBvalue\fR argument should be a colon separated list of signature algorithms
321 in order of decreasing preference of the form \fBalgorithm+hash\fR. \fBalgorithm\fR
322 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
323 \&\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.
324 Note: algorithm and hash names are case sensitive.
325 .Sp
326 If this option is not set then all signature algorithms supported by the
327 OpenSSL library are permissible.
328 .IP "\fBClientSignatureAlgorithms\fR" 4
329 .IX Item "ClientSignatureAlgorithms"
330 This sets the supported signature algorithms associated with client
331 authentication for \s-1TLS\s0 v1.2. For servers the value is used in the supported
332 signature algorithms field of a certificate request. For clients it is
333 used to determine which signature algorithm to with the client certificate.
334 .Sp
335 The syntax of \fBvalue\fR is identical to \fBSignatureAlgorithms\fR. If not set then
336 the value set for \fBSignatureAlgorithms\fR will be used instead.
337 .IP "\fBCurves\fR" 4
338 .IX Item "Curves"
339 This sets the supported elliptic curves. For clients the curves are
340 sent using the supported curves extension. For servers it is used
341 to determine which curve to use. This setting affects curves used for both
342 signatures and key exchange, if applicable.
343 .Sp
344 The \fBvalue\fR argument is a colon separated list of curves. The curve can be
345 either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name (e.g
346 \&\fBprime256v1\fR). Curve names are case sensitive.
347 .IP "\fBECDHParameters\fR" 4
348 .IX Item "ECDHParameters"
349 This sets the temporary curve used for ephemeral \s-1ECDH\s0 modes. Only used by
350 servers
351 .Sp
352 The \fBvalue\fR argument is a curve name or the special value \fBAutomatic\fR which
353 picks an appropriate curve based on client and server preferences. The curve
354 can be either the \fB\s-1NIST\s0\fR name (e.g. \fBP\-256\fR) or an OpenSSL \s-1OID\s0 name
355 (e.g \fBprime256v1\fR). Curve names are case sensitive.
356 .IP "\fBProtocol\fR" 4
357 .IX Item "Protocol"
358 The supported versions of the \s-1SSL\s0 or \s-1TLS\s0 protocol.
359 .Sp
360 The \fBvalue\fR argument is a comma separated list of supported protocols to
361 enable or disable. If an protocol is preceded by \fB\-\fR that version is disabled.
362 Currently supported protocol values are \fBSSLv2\fR, \fBSSLv3\fR, \fBTLSv1\fR,
363 \&\fBTLSv1.1\fR and \fBTLSv1.2\fR.
364 All protocol versions other than \fBSSLv2\fR are enabled by default.
365 To avoid inadvertent enabling of \fBSSLv2\fR, when SSLv2 is disabled, it is not
366 possible to enable it via the \fBProtocol\fR command.
367 .IP "\fBOptions\fR" 4
368 .IX Item "Options"
369 The \fBvalue\fR argument is a comma separated list of various flags to set.
370 If a flag string is preceded \fB\-\fR it is disabled. See the
371 \&\fBSSL_CTX_set_options\fR function for more details of individual options.
372 .Sp
373 Each option is listed below. Where an operation is enabled by default
374 the \fB\-flag\fR syntax is needed to disable it.
375 .Sp
376 \&\fBSessionTicket\fR: session ticket support, enabled by default. Inverse of
377 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR: that is \fB\-SessionTicket\fR is the same as setting
378 \&\fB\s-1SSL_OP_NO_TICKET\s0\fR.
379 .Sp
380 \&\fBCompression\fR: \s-1SSL/TLS\s0 compression support, enabled by default. Inverse
381 of \fB\s-1SSL_OP_NO_COMPRESSION\s0\fR.
382 .Sp
383 \&\fBEmptyFragments\fR: use empty fragments as a countermeasure against a
384 \&\s-1SSL 3.0/TLS 1.0\s0 protocol vulnerability affecting \s-1CBC\s0 ciphers. It
385 is set by default. Inverse of \fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0\fR.
386 .Sp
387 \&\fBBugs\fR: enable various bug workarounds. Same as \fB\s-1SSL_OP_ALL\s0\fR.
388 .Sp
389 \&\fBDHSingle\fR: enable single use \s-1DH\s0 keys, set by default. Inverse of
390 \&\fB\s-1SSL_OP_DH_SINGLE\s0\fR. Only used by servers.
391 .Sp
392 \&\fBECDHSingle\fR enable single use \s-1ECDH\s0 keys, set by default. Inverse of
393 \&\fB\s-1SSL_OP_ECDH_SINGLE\s0\fR. Only used by servers.
394 .Sp
395 \&\fBServerPreference\fR use server and not client preference order when
396 determining which cipher suite, signature algorithm or elliptic curve
397 to use for an incoming connection.  Equivalent to
398 \&\fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR. Only used by servers.
399 .Sp
400 \&\fBNoResumptionOnRenegotiation\fR set
401 \&\fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR flag. Only used by servers.
402 .Sp
403 \&\fBUnsafeLegacyRenegotiation\fR permits the use of unsafe legacy renegotiation.
404 Equivalent to \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0\fR.
405 .Sp
406 \&\fBUnsafeLegacyServerConnect\fR permits the use of unsafe legacy renegotiation
407 for OpenSSL clients only. Equivalent to \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0\fR.
408 Set by default.
409 .SH "SUPPORTED COMMAND TYPES"
410 .IX Header "SUPPORTED COMMAND TYPES"
411 The function \fISSL_CONF_cmd_value_type()\fR currently returns one of the following
412 types:
413 .IP "\fB\s-1SSL_CONF_TYPE_UNKNOWN\s0\fR" 4
414 .IX Item "SSL_CONF_TYPE_UNKNOWN"
415 The \fBcmd\fR string is unrecognised, this return value can be use to flag
416 syntax errors.
417 .IP "\fB\s-1SSL_CONF_TYPE_STRING\s0\fR" 4
418 .IX Item "SSL_CONF_TYPE_STRING"
419 The value is a string without any specific structure.
420 .IP "\fB\s-1SSL_CONF_TYPE_FILE\s0\fR" 4
421 .IX Item "SSL_CONF_TYPE_FILE"
422 The value is a file name.
423 .IP "\fB\s-1SSL_CONF_TYPE_DIR\s0\fR" 4
424 .IX Item "SSL_CONF_TYPE_DIR"
425 The value is a directory name.
426 .SH "NOTES"
427 .IX Header "NOTES"
428 The order of operations is significant. This can be used to set either defaults
429 or values which cannot be overridden. For example if an application calls:
430 .PP
431 .Vb 2
432 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
433 \& SSL_CONF_cmd(ctx, userparam, uservalue);
434 .Ve
435 .PP
436 it will disable SSLv3 support by default but the user can override it. If
437 however the call sequence is:
438 .PP
439 .Vb 2
440 \& SSL_CONF_cmd(ctx, userparam, uservalue);
441 \& SSL_CONF_cmd(ctx, "Protocol", "\-SSLv3");
442 .Ve
443 .PP
444 then SSLv3 is \fBalways\fR disabled and attempt to override this by the user are
445 ignored.
446 .PP
447 By checking the return code of \fISSL_CTX_cmd()\fR it is possible to query if a
448 given \fBcmd\fR is recognised, this is useful is \fISSL_CTX_cmd()\fR values are
449 mixed with additional application specific operations.
450 .PP
451 For example an application might call \fISSL_CTX_cmd()\fR and if it returns
452 \&\-2 (unrecognised command) continue with processing of application specific
453 commands.
454 .PP
455 Applications can also use \fISSL_CTX_cmd()\fR to process command lines though the
456 utility function \fISSL_CTX_cmd_argv()\fR is normally used instead. One way
457 to do this is to set the prefix to an appropriate value using
458 \&\fISSL_CONF_CTX_set1_prefix()\fR, pass the current argument to \fBcmd\fR and the
459 following argument to \fBvalue\fR (which may be \s-1NULL\s0).
460 .PP
461 In this case if the return value is positive then it is used to skip that
462 number of arguments as they have been processed by \fISSL_CTX_cmd()\fR. If \-2 is
463 returned then \fBcmd\fR is not recognised and application specific arguments
464 can be checked instead. If \-3 is returned a required argument is missing
465 and an error is indicated. If 0 is returned some other error occurred and
466 this can be reported back to the user.
467 .PP
468 The function \fISSL_CONF_cmd_value_type()\fR can be used by applications to
469 check for the existence of a command or to perform additional syntax
470 checking or translation of the command value. For example if the return
471 value is \fB\s-1SSL_CONF_TYPE_FILE\s0\fR an application could translate a relative
472 pathname to an absolute pathname.
473 .SH "EXAMPLES"
474 .IX Header "EXAMPLES"
475 Set supported signature algorithms:
476 .PP
477 .Vb 1
478 \& SSL_CONF_cmd(ctx, "SignatureAlgorithms", "ECDSA+SHA256:RSA+SHA256:DSA+SHA256");
479 .Ve
480 .PP
481 Enable all protocols except SSLv3 and SSLv2:
482 .PP
483 .Vb 1
484 \& SSL_CONF_cmd(ctx, "Protocol", "ALL,\-SSLv3,\-SSLv2");
485 .Ve
486 .PP
487 Only enable TLSv1.2:
488 .PP
489 .Vb 1
490 \& SSL_CONF_cmd(ctx, "Protocol", "\-ALL,TLSv1.2");
491 .Ve
492 .PP
493 Disable \s-1TLS\s0 session tickets:
494 .PP
495 .Vb 1
496 \& SSL_CONF_cmd(ctx, "Options", "\-SessionTicket");
497 .Ve
498 .PP
499 Set supported curves to P\-256, P\-384:
500 .PP
501 .Vb 1
502 \& SSL_CONF_cmd(ctx, "Curves", "P\-256:P\-384");
503 .Ve
504 .PP
505 Set automatic support for any elliptic curve for key exchange:
506 .PP
507 .Vb 1
508 \& SSL_CONF_cmd(ctx, "ECDHParameters", "Automatic");
509 .Ve
510 .SH "RETURN VALUES"
511 .IX Header "RETURN VALUES"
512 \&\fISSL_CONF_cmd()\fR returns 1 if the value of \fBcmd\fR is recognised and \fBvalue\fR is
513 \&\fB\s-1NOT\s0\fR used and 2 if both \fBcmd\fR and \fBvalue\fR are used. In other words it
514 returns the number of arguments processed. This is useful when processing
515 command lines.
516 .PP
517 A return value of \-2 means \fBcmd\fR is not recognised.
518 .PP
519 A return value of \-3 means \fBcmd\fR is recognised and the command requires a
520 value but \fBvalue\fR is \s-1NULL.\s0
521 .PP
522 A return code of 0 indicates that both \fBcmd\fR and \fBvalue\fR are valid but an
523 error occurred attempting to perform the operation: for example due to an
524 error in the syntax of \fBvalue\fR in this case the error queue may provide
525 additional information.
526 .PP
527 \&\fISSL_CONF_finish()\fR returns 1 for success and 0 for failure.
528 .SH "SEE ALSO"
529 .IX Header "SEE ALSO"
530 \&\fISSL_CONF_CTX_new\fR\|(3),
531 \&\fISSL_CONF_CTX_set_flags\fR\|(3),
532 \&\fISSL_CONF_CTX_set1_prefix\fR\|(3),
533 \&\fISSL_CONF_CTX_set_ssl_ctx\fR\|(3),
534 \&\fISSL_CONF_cmd_argv\fR\|(3)
535 .SH "HISTORY"
536 .IX Header "HISTORY"
537 \&\fISSL_CONF_cmd()\fR was first added to OpenSSL 1.0.2