xref: /freebsd/crypto/openssl/doc/man3/SSL_CONF_cmd.pod (revision a208223130fb12daac9b4f52be1b3477b03ac521)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimSSL_CONF_cmd_value_type,
6e71b7053SJung-uk KimSSL_CONF_cmd - send configuration command
7e71b7053SJung-uk Kim
8e71b7053SJung-uk Kim=head1 SYNOPSIS
9e71b7053SJung-uk Kim
10e71b7053SJung-uk Kim #include <openssl/ssl.h>
11e71b7053SJung-uk Kim
12e71b7053SJung-uk Kim int SSL_CONF_cmd(SSL_CONF_CTX *cctx, const char *cmd, const char *value);
13e71b7053SJung-uk Kim int SSL_CONF_cmd_value_type(SSL_CONF_CTX *cctx, const char *cmd);
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim=head1 DESCRIPTION
16e71b7053SJung-uk Kim
17e71b7053SJung-uk KimThe function SSL_CONF_cmd() performs configuration operation B<cmd> with
18e71b7053SJung-uk Kimoptional parameter B<value> on B<ctx>. Its purpose is to simplify application
19e71b7053SJung-uk Kimconfiguration of B<SSL_CTX> or B<SSL> structures by providing a common
20e71b7053SJung-uk Kimframework for command line options or configuration files.
21e71b7053SJung-uk Kim
22e71b7053SJung-uk KimSSL_CONF_cmd_value_type() returns the type of value that B<cmd> refers to.
23e71b7053SJung-uk Kim
24e71b7053SJung-uk Kim=head1 SUPPORTED COMMAND LINE COMMANDS
25e71b7053SJung-uk Kim
26e71b7053SJung-uk KimCurrently supported B<cmd> names for command lines (i.e. when the
27e71b7053SJung-uk Kimflag B<SSL_CONF_CMDLINE> is set) are listed below. Note: all B<cmd> names
28e71b7053SJung-uk Kimare case sensitive. Unless otherwise stated commands can be used by
29e71b7053SJung-uk Kimboth clients and servers and the B<value> parameter is not used. The default
30e71b7053SJung-uk Kimprefix for command line commands is B<-> and that is reflected below.
31e71b7053SJung-uk Kim
32e71b7053SJung-uk Kim=over 4
33e71b7053SJung-uk Kim
34e71b7053SJung-uk Kim=item B<-sigalgs>
35e71b7053SJung-uk Kim
36e71b7053SJung-uk KimThis sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
37e71b7053SJung-uk KimFor clients this
38e71b7053SJung-uk Kimvalue is used directly for the supported signature algorithms extension. For
39e71b7053SJung-uk Kimservers it is used to determine which signature algorithms to support.
40e71b7053SJung-uk Kim
41e71b7053SJung-uk KimThe B<value> argument should be a colon separated list of signature algorithms
42e71b7053SJung-uk Kimin order of decreasing preference of the form B<algorithm+hash> or
43e71b7053SJung-uk KimB<signature_scheme>. B<algorithm>
44e71b7053SJung-uk Kimis one of B<RSA>, B<DSA> or B<ECDSA> and B<hash> is a supported algorithm
45e71b7053SJung-uk KimOID short name such as B<SHA1>, B<SHA224>, B<SHA256>, B<SHA384> of B<SHA512>.
46e71b7053SJung-uk KimNote: algorithm and hash names are case sensitive.
47e71b7053SJung-uk KimB<signature_scheme> is one of the signature schemes defined in TLSv1.3,
48e71b7053SJung-uk Kimspecified using the IETF name, e.g., B<ecdsa_secp256r1_sha256>, B<ed25519>,
49e71b7053SJung-uk Kimor B<rsa_pss_pss_sha256>.
50e71b7053SJung-uk Kim
51e71b7053SJung-uk KimIf this option is not set then all signature algorithms supported by the
52e71b7053SJung-uk KimOpenSSL library are permissible.
53e71b7053SJung-uk Kim
54e71b7053SJung-uk KimNote: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
55e71b7053SJung-uk Kimusing B<RSA> as the B<algorithm> or by using one of the B<rsa_pkcs1_*>
56e71b7053SJung-uk Kimidentifiers) are ignored in TLSv1.3 and will not be negotiated.
57e71b7053SJung-uk Kim
58e71b7053SJung-uk Kim=item B<-client_sigalgs>
59e71b7053SJung-uk Kim
60e71b7053SJung-uk KimThis sets the supported signature algorithms associated with client
61e71b7053SJung-uk Kimauthentication for TLSv1.2 and TLSv1.3.
62e71b7053SJung-uk KimFor servers the value is used in the
63e71b7053SJung-uk KimB<signature_algorithms> field of a B<CertificateRequest> message.
64e71b7053SJung-uk KimFor clients it is
65e71b7053SJung-uk Kimused to determine which signature algorithm to use with the client certificate.
66e71b7053SJung-uk KimIf a server does not request a certificate this option has no effect.
67e71b7053SJung-uk Kim
68e71b7053SJung-uk KimThe syntax of B<value> is identical to B<-sigalgs>. If not set then
69e71b7053SJung-uk Kimthe value set for B<-sigalgs> will be used instead.
70e71b7053SJung-uk Kim
71e71b7053SJung-uk Kim=item B<-groups>
72e71b7053SJung-uk Kim
73e71b7053SJung-uk KimThis sets the supported groups. For clients, the groups are
74e71b7053SJung-uk Kimsent using the supported groups extension. For servers, it is used
75e71b7053SJung-uk Kimto determine which group to use. This setting affects groups used for
76e71b7053SJung-uk Kimsignatures (in TLSv1.2 and earlier) and key exchange. The first group listed
77e71b7053SJung-uk Kimwill also be used for the B<key_share> sent by a client in a TLSv1.3
78e71b7053SJung-uk KimB<ClientHello>.
79e71b7053SJung-uk Kim
80e71b7053SJung-uk KimThe B<value> argument is a colon separated list of groups. The group can be
81e71b7053SJung-uk Kimeither the B<NIST> name (e.g. B<P-256>), some other commonly used name where
8258f35182SJung-uk Kimapplicable (e.g. B<X25519>) or an OpenSSL OID name (e.g. B<prime256v1>). Group
83e71b7053SJung-uk Kimnames are case sensitive. The list should be in order of preference with the
84e71b7053SJung-uk Kimmost preferred group first.
85e71b7053SJung-uk Kim
86e71b7053SJung-uk Kim=item B<-curves>
87e71b7053SJung-uk Kim
88e71b7053SJung-uk KimThis is a synonym for the "-groups" command.
89e71b7053SJung-uk Kim
90e71b7053SJung-uk Kim=item B<-named_curve>
91e71b7053SJung-uk Kim
92e71b7053SJung-uk KimThis sets the temporary curve used for ephemeral ECDH modes. Only used by
93e71b7053SJung-uk Kimservers
94e71b7053SJung-uk Kim
95e71b7053SJung-uk KimThe B<value> argument is a curve name or the special value B<auto> which
96e71b7053SJung-uk Kimpicks an appropriate curve based on client and server preferences. The curve
97e71b7053SJung-uk Kimcan be either the B<NIST> name (e.g. B<P-256>) or an OpenSSL OID name
9858f35182SJung-uk Kim(e.g. B<prime256v1>). Curve names are case sensitive.
99e71b7053SJung-uk Kim
100e71b7053SJung-uk Kim=item B<-cipher>
101e71b7053SJung-uk Kim
102e71b7053SJung-uk KimSets the TLSv1.2 and below ciphersuite list to B<value>. This list will be
103e71b7053SJung-uk Kimcombined with any configured TLSv1.3 ciphersuites. Note: syntax checking
104e71b7053SJung-uk Kimof B<value> is currently not performed unless a B<SSL> or B<SSL_CTX> structure is
105e71b7053SJung-uk Kimassociated with B<cctx>.
106e71b7053SJung-uk Kim
107e71b7053SJung-uk Kim=item B<-ciphersuites>
108e71b7053SJung-uk Kim
109e71b7053SJung-uk KimSets the available ciphersuites for TLSv1.3 to value. This is a simple colon
110e71b7053SJung-uk Kim(":") separated list of TLSv1.3 ciphersuite names in order of preference. This
111e71b7053SJung-uk Kimlist will be combined any configured TLSv1.2 and below ciphersuites.
112e71b7053SJung-uk KimSee L<ciphers(1)> for more information.
113e71b7053SJung-uk Kim
114e71b7053SJung-uk Kim
115e71b7053SJung-uk Kim=item B<-cert>
116e71b7053SJung-uk Kim
117e71b7053SJung-uk KimAttempts to use the file B<value> as the certificate for the appropriate
118e71b7053SJung-uk Kimcontext. It currently uses SSL_CTX_use_certificate_chain_file() if an B<SSL_CTX>
119e71b7053SJung-uk Kimstructure is set or SSL_use_certificate_file() with filetype PEM if an B<SSL>
120e71b7053SJung-uk Kimstructure is set. This option is only supported if certificate operations
121e71b7053SJung-uk Kimare permitted.
122e71b7053SJung-uk Kim
123e71b7053SJung-uk Kim=item B<-key>
124e71b7053SJung-uk Kim
125e71b7053SJung-uk KimAttempts to use the file B<value> as the private key for the appropriate
126e71b7053SJung-uk Kimcontext. This option is only supported if certificate operations
127e71b7053SJung-uk Kimare permitted. Note: if no B<-key> option is set then a private key is
128e71b7053SJung-uk Kimnot loaded unless the flag B<SSL_CONF_FLAG_REQUIRE_PRIVATE> is set.
129e71b7053SJung-uk Kim
130e71b7053SJung-uk Kim=item B<-dhparam>
131e71b7053SJung-uk Kim
132e71b7053SJung-uk KimAttempts to use the file B<value> as the set of temporary DH parameters for
133e71b7053SJung-uk Kimthe appropriate context. This option is only supported if certificate
134e71b7053SJung-uk Kimoperations are permitted.
135e71b7053SJung-uk Kim
136e71b7053SJung-uk Kim=item B<-record_padding>
137e71b7053SJung-uk Kim
138e71b7053SJung-uk KimAttempts to pad TLSv1.3 records so that they are a multiple of B<value> in
139e71b7053SJung-uk Kimlength on send. A B<value> of 0 or 1 turns off padding. Otherwise, the
140e71b7053SJung-uk KimB<value> must be >1 or <=16384.
141e71b7053SJung-uk Kim
142e71b7053SJung-uk Kim=item B<-no_renegotiation>
143e71b7053SJung-uk Kim
144e71b7053SJung-uk KimDisables all attempts at renegotiation in TLSv1.2 and earlier, same as setting
145e71b7053SJung-uk KimB<SSL_OP_NO_RENEGOTIATION>.
146e71b7053SJung-uk Kim
147e71b7053SJung-uk Kim=item B<-min_protocol>, B<-max_protocol>
148e71b7053SJung-uk Kim
149e71b7053SJung-uk KimSets the minimum and maximum supported protocol.
15058f35182SJung-uk KimCurrently supported protocol values are B<SSLv3>, B<TLSv1>, B<TLSv1.1>,
15158f35182SJung-uk KimB<TLSv1.2>, B<TLSv1.3> for TLS; B<DTLSv1>, B<DTLSv1.2> for DTLS, and B<None>
15258f35182SJung-uk Kimfor no limit.
15358f35182SJung-uk KimIf either the lower or upper bound is not specified then only the other bound
15458f35182SJung-uk Kimapplies, if specified.
15558f35182SJung-uk KimIf your application supports both TLS and DTLS you can specify any of these
15658f35182SJung-uk Kimoptions twice, once with a bound for TLS and again with an appropriate bound
15758f35182SJung-uk Kimfor DTLS.
15858f35182SJung-uk KimTo restrict the supported protocol versions use these commands rather than the
15958f35182SJung-uk Kimdeprecated alternative commands below.
160e71b7053SJung-uk Kim
161e71b7053SJung-uk Kim=item B<-no_ssl3>, B<-no_tls1>, B<-no_tls1_1>, B<-no_tls1_2>, B<-no_tls1_3>
162e71b7053SJung-uk Kim
163e71b7053SJung-uk KimDisables protocol support for SSLv3, TLSv1.0, TLSv1.1, TLSv1.2 or TLSv1.3 by
164e71b7053SJung-uk Kimsetting the corresponding options B<SSL_OP_NO_SSLv3>, B<SSL_OP_NO_TLSv1>,
165e71b7053SJung-uk KimB<SSL_OP_NO_TLSv1_1>, B<SSL_OP_NO_TLSv1_2> and B<SSL_OP_NO_TLSv1_3>
166e71b7053SJung-uk Kimrespectively. These options are deprecated, instead use B<-min_protocol> and
167e71b7053SJung-uk KimB<-max_protocol>.
168e71b7053SJung-uk Kim
169e71b7053SJung-uk Kim=item B<-bugs>
170e71b7053SJung-uk Kim
171e71b7053SJung-uk KimVarious bug workarounds are set, same as setting B<SSL_OP_ALL>.
172e71b7053SJung-uk Kim
173e71b7053SJung-uk Kim=item B<-comp>
174e71b7053SJung-uk Kim
175e71b7053SJung-uk KimEnables support for SSL/TLS compression, same as clearing
176e71b7053SJung-uk KimB<SSL_OP_NO_COMPRESSION>.
177e71b7053SJung-uk KimThis command was introduced in OpenSSL 1.1.0.
178e71b7053SJung-uk KimAs of OpenSSL 1.1.0, compression is off by default.
179e71b7053SJung-uk Kim
180e71b7053SJung-uk Kim=item B<-no_comp>
181e71b7053SJung-uk Kim
182e71b7053SJung-uk KimDisables support for SSL/TLS compression, same as setting
183e71b7053SJung-uk KimB<SSL_OP_NO_COMPRESSION>.
184e71b7053SJung-uk KimAs of OpenSSL 1.1.0, compression is off by default.
185e71b7053SJung-uk Kim
186e71b7053SJung-uk Kim=item B<-no_ticket>
187e71b7053SJung-uk Kim
188e71b7053SJung-uk KimDisables support for session tickets, same as setting B<SSL_OP_NO_TICKET>.
189e71b7053SJung-uk Kim
190e71b7053SJung-uk Kim=item B<-serverpref>
191e71b7053SJung-uk Kim
192e71b7053SJung-uk KimUse server and not client preference order when determining which cipher suite,
193e71b7053SJung-uk Kimsignature algorithm or elliptic curve to use for an incoming connection.
194e71b7053SJung-uk KimEquivalent to B<SSL_OP_CIPHER_SERVER_PREFERENCE>. Only used by servers.
195e71b7053SJung-uk Kim
196e71b7053SJung-uk Kim=item B<-prioritize_chacha>
197e71b7053SJung-uk Kim
198e71b7053SJung-uk KimPrioritize ChaCha ciphers when the client has a ChaCha20 cipher at the top of
199e71b7053SJung-uk Kimits preference list. This usually indicates a client without AES hardware
200e71b7053SJung-uk Kimacceleration (e.g. mobile) is in use. Equivalent to B<SSL_OP_PRIORITIZE_CHACHA>.
201e71b7053SJung-uk KimOnly used by servers. Requires B<-serverpref>.
202e71b7053SJung-uk Kim
203e71b7053SJung-uk Kim=item B<-no_resumption_on_reneg>
204e71b7053SJung-uk Kim
205e71b7053SJung-uk Kimset SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION flag. Only used by servers.
206e71b7053SJung-uk Kim
207e71b7053SJung-uk Kim=item B<-legacyrenegotiation>
208e71b7053SJung-uk Kim
209e71b7053SJung-uk Kimpermits the use of unsafe legacy renegotiation. Equivalent to setting
210e71b7053SJung-uk KimB<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION>.
211e71b7053SJung-uk Kim
212e71b7053SJung-uk Kim=item B<-legacy_server_connect>, B<-no_legacy_server_connect>
213e71b7053SJung-uk Kim
214e71b7053SJung-uk Kimpermits or prohibits the use of unsafe legacy renegotiation for OpenSSL
215e71b7053SJung-uk Kimclients only. Equivalent to setting or clearing B<SSL_OP_LEGACY_SERVER_CONNECT>.
216e71b7053SJung-uk KimSet by default.
217e71b7053SJung-uk Kim
218e71b7053SJung-uk Kim=item B<-allow_no_dhe_kex>
219e71b7053SJung-uk Kim
220e71b7053SJung-uk KimIn TLSv1.3 allow a non-(ec)dhe based key exchange mode on resumption. This means
221e71b7053SJung-uk Kimthat there will be no forward secrecy for the resumed session.
222e71b7053SJung-uk Kim
223e71b7053SJung-uk Kim=item B<-strict>
224e71b7053SJung-uk Kim
225e71b7053SJung-uk Kimenables strict mode protocol handling. Equivalent to setting
226e71b7053SJung-uk KimB<SSL_CERT_FLAG_TLS_STRICT>.
227e71b7053SJung-uk Kim
228e71b7053SJung-uk Kim=item B<-anti_replay>, B<-no_anti_replay>
229e71b7053SJung-uk Kim
230e71b7053SJung-uk KimSwitches replay protection, on or off respectively. With replay protection on,
231e71b7053SJung-uk KimOpenSSL will automatically detect if a session ticket has been used more than
232e71b7053SJung-uk Kimonce, TLSv1.3 has been negotiated, and early data is enabled on the server. A
233e71b7053SJung-uk Kimfull handshake is forced if a session ticket is used a second or subsequent
234e71b7053SJung-uk Kimtime. Anti-Replay is on by default unless overridden by a configuration file and
235e71b7053SJung-uk Kimis only used by servers. Anti-replay measures are required for compliance with
236e71b7053SJung-uk Kimthe TLSv1.3 specification. Some applications may be able to mitigate the replay
237e71b7053SJung-uk Kimrisks in other ways and in such cases the built-in OpenSSL functionality is not
238e71b7053SJung-uk Kimrequired. Switching off anti-replay is equivalent to B<SSL_OP_NO_ANTI_REPLAY>.
239e71b7053SJung-uk Kim
240e71b7053SJung-uk Kim=back
241e71b7053SJung-uk Kim
242e71b7053SJung-uk Kim=head1 SUPPORTED CONFIGURATION FILE COMMANDS
243e71b7053SJung-uk Kim
244e71b7053SJung-uk KimCurrently supported B<cmd> names for configuration files (i.e. when the
245e71b7053SJung-uk Kimflag B<SSL_CONF_FLAG_FILE> is set) are listed below. All configuration file
246e71b7053SJung-uk KimB<cmd> names are case insensitive so B<signaturealgorithms> is recognised
247e71b7053SJung-uk Kimas well as B<SignatureAlgorithms>. Unless otherwise stated the B<value> names
248e71b7053SJung-uk Kimare also case insensitive.
249e71b7053SJung-uk Kim
250e71b7053SJung-uk KimNote: the command prefix (if set) alters the recognised B<cmd> values.
251e71b7053SJung-uk Kim
252e71b7053SJung-uk Kim=over 4
253e71b7053SJung-uk Kim
254e71b7053SJung-uk Kim=item B<CipherString>
255e71b7053SJung-uk Kim
256e71b7053SJung-uk KimSets the ciphersuite list for TLSv1.2 and below to B<value>. This list will be
257e71b7053SJung-uk Kimcombined with any configured TLSv1.3 ciphersuites. Note: syntax
258e71b7053SJung-uk Kimchecking of B<value> is currently not performed unless an B<SSL> or B<SSL_CTX>
259e71b7053SJung-uk Kimstructure is associated with B<cctx>.
260e71b7053SJung-uk Kim
261e71b7053SJung-uk Kim=item B<Ciphersuites>
262e71b7053SJung-uk Kim
263e71b7053SJung-uk KimSets the available ciphersuites for TLSv1.3 to B<value>. This is a simple colon
264e71b7053SJung-uk Kim(":") separated list of TLSv1.3 ciphersuite names in order of preference. This
265e71b7053SJung-uk Kimlist will be combined any configured TLSv1.2 and below ciphersuites.
266e71b7053SJung-uk KimSee L<ciphers(1)> for more information.
267e71b7053SJung-uk Kim
268e71b7053SJung-uk Kim=item B<Certificate>
269e71b7053SJung-uk Kim
270e71b7053SJung-uk KimAttempts to use the file B<value> as the certificate for the appropriate
271e71b7053SJung-uk Kimcontext. It currently uses SSL_CTX_use_certificate_chain_file() if an B<SSL_CTX>
272e71b7053SJung-uk Kimstructure is set or SSL_use_certificate_file() with filetype PEM if an B<SSL>
273e71b7053SJung-uk Kimstructure is set. This option is only supported if certificate operations
274e71b7053SJung-uk Kimare permitted.
275e71b7053SJung-uk Kim
276e71b7053SJung-uk Kim=item B<PrivateKey>
277e71b7053SJung-uk Kim
278e71b7053SJung-uk KimAttempts to use the file B<value> as the private key for the appropriate
279e71b7053SJung-uk Kimcontext. This option is only supported if certificate operations
280e71b7053SJung-uk Kimare permitted. Note: if no B<PrivateKey> option is set then a private key is
281e71b7053SJung-uk Kimnot loaded unless the B<SSL_CONF_FLAG_REQUIRE_PRIVATE> is set.
282e71b7053SJung-uk Kim
283e71b7053SJung-uk Kim=item B<ChainCAFile>, B<ChainCAPath>, B<VerifyCAFile>, B<VerifyCAPath>
284e71b7053SJung-uk Kim
285e71b7053SJung-uk KimThese options indicate a file or directory used for building certificate
286e71b7053SJung-uk Kimchains or verifying certificate chains. These options are only supported
287e71b7053SJung-uk Kimif certificate operations are permitted.
288e71b7053SJung-uk Kim
289e71b7053SJung-uk Kim=item B<RequestCAFile>
290e71b7053SJung-uk Kim
291e71b7053SJung-uk KimThis option indicates a file containing a set of certificates in PEM form.
292e71b7053SJung-uk KimThe subject names of the certificates are sent to the peer in the
293e71b7053SJung-uk KimB<certificate_authorities> extension for TLS 1.3 (in ClientHello or
294e71b7053SJung-uk KimCertificateRequest) or in a certificate request for previous versions or
295e71b7053SJung-uk KimTLS.
296e71b7053SJung-uk Kim
297e71b7053SJung-uk Kim=item B<ServerInfoFile>
298e71b7053SJung-uk Kim
299e71b7053SJung-uk KimAttempts to use the file B<value> in the "serverinfo" extension using the
300e71b7053SJung-uk Kimfunction SSL_CTX_use_serverinfo_file.
301e71b7053SJung-uk Kim
302e71b7053SJung-uk Kim=item B<DHParameters>
303e71b7053SJung-uk Kim
304e71b7053SJung-uk KimAttempts to use the file B<value> as the set of temporary DH parameters for
305e71b7053SJung-uk Kimthe appropriate context. This option is only supported if certificate
306e71b7053SJung-uk Kimoperations are permitted.
307e71b7053SJung-uk Kim
308e71b7053SJung-uk Kim=item B<RecordPadding>
309e71b7053SJung-uk Kim
310e71b7053SJung-uk KimAttempts to pad TLSv1.3 records so that they are a multiple of B<value> in
311e71b7053SJung-uk Kimlength on send. A B<value> of 0 or 1 turns off padding. Otherwise, the
312e71b7053SJung-uk KimB<value> must be >1 or <=16384.
313e71b7053SJung-uk Kim
314e71b7053SJung-uk Kim=item B<SignatureAlgorithms>
315e71b7053SJung-uk Kim
316e71b7053SJung-uk KimThis sets the supported signature algorithms for TLSv1.2 and TLSv1.3.
317e71b7053SJung-uk KimFor clients this
318e71b7053SJung-uk Kimvalue is used directly for the supported signature algorithms extension. For
319e71b7053SJung-uk Kimservers it is used to determine which signature algorithms to support.
320e71b7053SJung-uk Kim
321e71b7053SJung-uk KimThe B<value> argument should be a colon separated list of signature algorithms
322e71b7053SJung-uk Kimin order of decreasing preference of the form B<algorithm+hash> or
323e71b7053SJung-uk KimB<signature_scheme>. B<algorithm>
324e71b7053SJung-uk Kimis one of B<RSA>, B<DSA> or B<ECDSA> and B<hash> is a supported algorithm
325e71b7053SJung-uk KimOID short name such as B<SHA1>, B<SHA224>, B<SHA256>, B<SHA384> of B<SHA512>.
326e71b7053SJung-uk KimNote: algorithm and hash names are case sensitive.
327e71b7053SJung-uk KimB<signature_scheme> is one of the signature schemes defined in TLSv1.3,
328e71b7053SJung-uk Kimspecified using the IETF name, e.g., B<ecdsa_secp256r1_sha256>, B<ed25519>,
329e71b7053SJung-uk Kimor B<rsa_pss_pss_sha256>.
330e71b7053SJung-uk Kim
331e71b7053SJung-uk KimIf this option is not set then all signature algorithms supported by the
332e71b7053SJung-uk KimOpenSSL library are permissible.
333e71b7053SJung-uk Kim
334e71b7053SJung-uk KimNote: algorithms which specify a PKCS#1 v1.5 signature scheme (either by
335e71b7053SJung-uk Kimusing B<RSA> as the B<algorithm> or by using one of the B<rsa_pkcs1_*>
336e71b7053SJung-uk Kimidentifiers) are ignored in TLSv1.3 and will not be negotiated.
337e71b7053SJung-uk Kim
338e71b7053SJung-uk Kim=item B<ClientSignatureAlgorithms>
339e71b7053SJung-uk Kim
340e71b7053SJung-uk KimThis sets the supported signature algorithms associated with client
341e71b7053SJung-uk Kimauthentication for TLSv1.2 and TLSv1.3.
342e71b7053SJung-uk KimFor servers the value is used in the
343e71b7053SJung-uk KimB<signature_algorithms> field of a B<CertificateRequest> message.
344e71b7053SJung-uk KimFor clients it is
345e71b7053SJung-uk Kimused to determine which signature algorithm to use with the client certificate.
346e71b7053SJung-uk KimIf a server does not request a certificate this option has no effect.
347e71b7053SJung-uk Kim
348e71b7053SJung-uk KimThe syntax of B<value> is identical to B<SignatureAlgorithms>. If not set then
349e71b7053SJung-uk Kimthe value set for B<SignatureAlgorithms> will be used instead.
350e71b7053SJung-uk Kim
351e71b7053SJung-uk Kim=item B<Groups>
352e71b7053SJung-uk Kim
353e71b7053SJung-uk KimThis sets the supported groups. For clients, the groups are
354e71b7053SJung-uk Kimsent using the supported groups extension. For servers, it is used
355e71b7053SJung-uk Kimto determine which group to use. This setting affects groups used for
356e71b7053SJung-uk Kimsignatures (in TLSv1.2 and earlier) and key exchange. The first group listed
357e71b7053SJung-uk Kimwill also be used for the B<key_share> sent by a client in a TLSv1.3
358e71b7053SJung-uk KimB<ClientHello>.
359e71b7053SJung-uk Kim
360e71b7053SJung-uk KimThe B<value> argument is a colon separated list of groups. The group can be
361e71b7053SJung-uk Kimeither the B<NIST> name (e.g. B<P-256>), some other commonly used name where
36258f35182SJung-uk Kimapplicable (e.g. B<X25519>) or an OpenSSL OID name (e.g. B<prime256v1>). Group
363e71b7053SJung-uk Kimnames are case sensitive. The list should be in order of preference with the
364e71b7053SJung-uk Kimmost preferred group first.
365e71b7053SJung-uk Kim
366e71b7053SJung-uk Kim=item B<Curves>
367e71b7053SJung-uk Kim
368e71b7053SJung-uk KimThis is a synonym for the "Groups" command.
369e71b7053SJung-uk Kim
370e71b7053SJung-uk Kim=item B<MinProtocol>
371e71b7053SJung-uk Kim
372e71b7053SJung-uk KimThis sets the minimum supported SSL, TLS or DTLS version.
373e71b7053SJung-uk Kim
374e71b7053SJung-uk KimCurrently supported protocol values are B<SSLv3>, B<TLSv1>, B<TLSv1.1>,
375e71b7053SJung-uk KimB<TLSv1.2>, B<TLSv1.3>, B<DTLSv1> and B<DTLSv1.2>.
37658f35182SJung-uk KimThe SSL and TLS bounds apply only to TLS-based contexts, while the DTLS bounds
37758f35182SJung-uk Kimapply only to DTLS-based contexts.
37858f35182SJung-uk KimThe command can be repeated with one instance setting a TLS bound, and the
37958f35182SJung-uk Kimother setting a DTLS bound.
38058f35182SJung-uk KimThe value B<None> applies to both types of contexts and disables the limits.
381e71b7053SJung-uk Kim
382e71b7053SJung-uk Kim=item B<MaxProtocol>
383e71b7053SJung-uk Kim
384e71b7053SJung-uk KimThis sets the maximum supported SSL, TLS or DTLS version.
385e71b7053SJung-uk Kim
386e71b7053SJung-uk KimCurrently supported protocol values are B<SSLv3>, B<TLSv1>, B<TLSv1.1>,
387e71b7053SJung-uk KimB<TLSv1.2>, B<TLSv1.3>, B<DTLSv1> and B<DTLSv1.2>.
38858f35182SJung-uk KimThe SSL and TLS bounds apply only to TLS-based contexts, while the DTLS bounds
38958f35182SJung-uk Kimapply only to DTLS-based contexts.
39058f35182SJung-uk KimThe command can be repeated with one instance setting a TLS bound, and the
39158f35182SJung-uk Kimother setting a DTLS bound.
39258f35182SJung-uk KimThe value B<None> applies to both types of contexts and disables the limits.
393e71b7053SJung-uk Kim
394e71b7053SJung-uk Kim=item B<Protocol>
395e71b7053SJung-uk Kim
396e71b7053SJung-uk KimThis can be used to enable or disable certain versions of the SSL,
397e71b7053SJung-uk KimTLS or DTLS protocol.
398e71b7053SJung-uk Kim
399e71b7053SJung-uk KimThe B<value> argument is a comma separated list of supported protocols
400e71b7053SJung-uk Kimto enable or disable.
401e71b7053SJung-uk KimIf a protocol is preceded by B<-> that version is disabled.
402e71b7053SJung-uk Kim
403e71b7053SJung-uk KimAll protocol versions are enabled by default.
404e71b7053SJung-uk KimYou need to disable at least one protocol version for this setting have any
405e71b7053SJung-uk Kimeffect.
406e71b7053SJung-uk KimOnly enabling some protocol versions does not disable the other protocol
407e71b7053SJung-uk Kimversions.
408e71b7053SJung-uk Kim
409e71b7053SJung-uk KimCurrently supported protocol values are B<SSLv3>, B<TLSv1>, B<TLSv1.1>,
410e71b7053SJung-uk KimB<TLSv1.2>, B<TLSv1.3>, B<DTLSv1> and B<DTLSv1.2>.
411e71b7053SJung-uk KimThe special value B<ALL> refers to all supported versions.
412e71b7053SJung-uk Kim
413e71b7053SJung-uk KimThis can't enable protocols that are disabled using B<MinProtocol>
414e71b7053SJung-uk Kimor B<MaxProtocol>, but can disable protocols that are still allowed
415e71b7053SJung-uk Kimby them.
416e71b7053SJung-uk Kim
417e71b7053SJung-uk KimThe B<Protocol> command is fragile and deprecated; do not use it.
418e71b7053SJung-uk KimUse B<MinProtocol> and B<MaxProtocol> instead.
419e71b7053SJung-uk KimIf you do use B<Protocol>, make sure that the resulting range of enabled
420e71b7053SJung-uk Kimprotocols has no "holes", e.g. if TLS 1.0 and TLS 1.2 are both enabled, make
421e71b7053SJung-uk Kimsure to also leave TLS 1.1 enabled.
422e71b7053SJung-uk Kim
423e71b7053SJung-uk Kim=item B<Options>
424e71b7053SJung-uk Kim
425e71b7053SJung-uk KimThe B<value> argument is a comma separated list of various flags to set.
426e71b7053SJung-uk KimIf a flag string is preceded B<-> it is disabled.
427e71b7053SJung-uk KimSee the L<SSL_CTX_set_options(3)> function for more details of
428e71b7053SJung-uk Kimindividual options.
429e71b7053SJung-uk Kim
430e71b7053SJung-uk KimEach option is listed below. Where an operation is enabled by default
431e71b7053SJung-uk Kimthe B<-flag> syntax is needed to disable it.
432e71b7053SJung-uk Kim
433e71b7053SJung-uk KimB<SessionTicket>: session ticket support, enabled by default. Inverse of
434e71b7053SJung-uk KimB<SSL_OP_NO_TICKET>: that is B<-SessionTicket> is the same as setting
435e71b7053SJung-uk KimB<SSL_OP_NO_TICKET>.
436e71b7053SJung-uk Kim
437e71b7053SJung-uk KimB<Compression>: SSL/TLS compression support, enabled by default. Inverse
438e71b7053SJung-uk Kimof B<SSL_OP_NO_COMPRESSION>.
439e71b7053SJung-uk Kim
440e71b7053SJung-uk KimB<EmptyFragments>: use empty fragments as a countermeasure against a
441e71b7053SJung-uk KimSSL 3.0/TLS 1.0 protocol vulnerability affecting CBC ciphers. It
442e71b7053SJung-uk Kimis set by default. Inverse of B<SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS>.
443e71b7053SJung-uk Kim
444e71b7053SJung-uk KimB<Bugs>: enable various bug workarounds. Same as B<SSL_OP_ALL>.
445e71b7053SJung-uk Kim
446e71b7053SJung-uk KimB<DHSingle>: enable single use DH keys, set by default. Inverse of
447e71b7053SJung-uk KimB<SSL_OP_DH_SINGLE>. Only used by servers.
448e71b7053SJung-uk Kim
449e71b7053SJung-uk KimB<ECDHSingle>: enable single use ECDH keys, set by default. Inverse of
450e71b7053SJung-uk KimB<SSL_OP_ECDH_SINGLE>. Only used by servers.
451e71b7053SJung-uk Kim
452e71b7053SJung-uk KimB<ServerPreference>: use server and not client preference order when
453e71b7053SJung-uk Kimdetermining which cipher suite, signature algorithm or elliptic curve
454e71b7053SJung-uk Kimto use for an incoming connection.  Equivalent to
455e71b7053SJung-uk KimB<SSL_OP_CIPHER_SERVER_PREFERENCE>. Only used by servers.
456e71b7053SJung-uk Kim
457e71b7053SJung-uk KimB<PrioritizeChaCha>: prioritizes ChaCha ciphers when the client has a
458e71b7053SJung-uk KimChaCha20 cipher at the top of its preference list. This usually indicates
459e71b7053SJung-uk Kima mobile client is in use. Equivalent to B<SSL_OP_PRIORITIZE_CHACHA>.
460e71b7053SJung-uk KimOnly used by servers.
461e71b7053SJung-uk Kim
462e71b7053SJung-uk KimB<NoResumptionOnRenegotiation>: set
463e71b7053SJung-uk KimB<SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION> flag. Only used by servers.
464e71b7053SJung-uk Kim
4656935a639SJung-uk KimB<NoRenegotiation>: disables all attempts at renegotiation in TLSv1.2 and
4666935a639SJung-uk Kimearlier, same as setting B<SSL_OP_NO_RENEGOTIATION>.
4676935a639SJung-uk Kim
468e71b7053SJung-uk KimB<UnsafeLegacyRenegotiation>: permits the use of unsafe legacy renegotiation.
469e71b7053SJung-uk KimEquivalent to B<SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION>.
470e71b7053SJung-uk Kim
471e71b7053SJung-uk KimB<UnsafeLegacyServerConnect>: permits the use of unsafe legacy renegotiation
472e71b7053SJung-uk Kimfor OpenSSL clients only. Equivalent to B<SSL_OP_LEGACY_SERVER_CONNECT>.
473e71b7053SJung-uk KimSet by default.
474e71b7053SJung-uk Kim
475e71b7053SJung-uk KimB<EncryptThenMac>: use encrypt-then-mac extension, enabled by
476e71b7053SJung-uk Kimdefault. Inverse of B<SSL_OP_NO_ENCRYPT_THEN_MAC>: that is,
477e71b7053SJung-uk KimB<-EncryptThenMac> is the same as setting B<SSL_OP_NO_ENCRYPT_THEN_MAC>.
478e71b7053SJung-uk Kim
479e71b7053SJung-uk KimB<AllowNoDHEKEX>: In TLSv1.3 allow a non-(ec)dhe based key exchange mode on
480e71b7053SJung-uk Kimresumption. This means that there will be no forward secrecy for the resumed
481e71b7053SJung-uk Kimsession. Equivalent to B<SSL_OP_ALLOW_NO_DHE_KEX>.
482e71b7053SJung-uk Kim
483e71b7053SJung-uk KimB<MiddleboxCompat>: If set then dummy Change Cipher Spec (CCS) messages are sent
484e71b7053SJung-uk Kimin TLSv1.3. This has the effect of making TLSv1.3 look more like TLSv1.2 so that
485e71b7053SJung-uk Kimmiddleboxes that do not understand TLSv1.3 will not drop the connection. This
486e71b7053SJung-uk Kimoption is set by default. A future version of OpenSSL may not set this by
487e71b7053SJung-uk Kimdefault. Equivalent to B<SSL_OP_ENABLE_MIDDLEBOX_COMPAT>.
488e71b7053SJung-uk Kim
489e71b7053SJung-uk KimB<AntiReplay>: If set then OpenSSL will automatically detect if a session ticket
490e71b7053SJung-uk Kimhas been used more than once, TLSv1.3 has been negotiated, and early data is
491e71b7053SJung-uk Kimenabled on the server. A full handshake is forced if a session ticket is used a
492e71b7053SJung-uk Kimsecond or subsequent time. This option is set by default and is only used by
493e71b7053SJung-uk Kimservers. Anti-replay measures are required to comply with the TLSv1.3
494e71b7053SJung-uk Kimspecification. Some applications may be able to mitigate the replay risks in
495e71b7053SJung-uk Kimother ways and in such cases the built-in OpenSSL functionality is not required.
496e71b7053SJung-uk KimDisabling anti-replay is equivalent to setting B<SSL_OP_NO_ANTI_REPLAY>.
497e71b7053SJung-uk Kim
498*a2082231SJohn BaldwinB<KTLS>: Enables kernel TLS if support has been compiled in, and it is supported
499*a2082231SJohn Baldwinby the negotiated ciphersuites and extensions. Equivalent to
500*a2082231SJohn BaldwinB<SSL_OP_ENABLE_KTLS>.
501*a2082231SJohn Baldwin
502e71b7053SJung-uk Kim=item B<VerifyMode>
503e71b7053SJung-uk Kim
504e71b7053SJung-uk KimThe B<value> argument is a comma separated list of flags to set.
505e71b7053SJung-uk Kim
506e71b7053SJung-uk KimB<Peer> enables peer verification: for clients only.
507e71b7053SJung-uk Kim
508e71b7053SJung-uk KimB<Request> requests but does not require a certificate from the client.
509e71b7053SJung-uk KimServers only.
510e71b7053SJung-uk Kim
511e71b7053SJung-uk KimB<Require> requests and requires a certificate from the client: an error
512e71b7053SJung-uk Kimoccurs if the client does not present a certificate. Servers only.
513e71b7053SJung-uk Kim
514e71b7053SJung-uk KimB<Once> requests a certificate from a client only on the initial connection:
515e71b7053SJung-uk Kimnot when renegotiating. Servers only.
516e71b7053SJung-uk Kim
517e71b7053SJung-uk KimB<RequestPostHandshake> configures the connection to support requests but does
518e71b7053SJung-uk Kimnot require a certificate from the client post-handshake. A certificate will
519e71b7053SJung-uk Kimnot be requested during the initial handshake. The server application must
520e71b7053SJung-uk Kimprovide a mechanism to request a certificate post-handshake. Servers only.
521e71b7053SJung-uk KimTLSv1.3 only.
522e71b7053SJung-uk Kim
523e71b7053SJung-uk KimB<RequiresPostHandshake> configures the connection to support requests and
524e71b7053SJung-uk Kimrequires a certificate from the client post-handshake: an error occurs if the
525e71b7053SJung-uk Kimclient does not present a certificate. A certificate will not be requested
526e71b7053SJung-uk Kimduring the initial handshake. The server application must provide a mechanism
527e71b7053SJung-uk Kimto request a certificate post-handshake. Servers only. TLSv1.3 only.
528e71b7053SJung-uk Kim
529e71b7053SJung-uk Kim=item B<ClientCAFile>, B<ClientCAPath>
530e71b7053SJung-uk Kim
531e71b7053SJung-uk KimA file or directory of certificates in PEM format whose names are used as the
532e71b7053SJung-uk Kimset of acceptable names for client CAs. Servers only. This option is only
533e71b7053SJung-uk Kimsupported if certificate operations are permitted.
534e71b7053SJung-uk Kim
535e71b7053SJung-uk Kim=back
536e71b7053SJung-uk Kim
537e71b7053SJung-uk Kim=head1 SUPPORTED COMMAND TYPES
538e71b7053SJung-uk Kim
539e71b7053SJung-uk KimThe function SSL_CONF_cmd_value_type() currently returns one of the following
540e71b7053SJung-uk Kimtypes:
541e71b7053SJung-uk Kim
542e71b7053SJung-uk Kim=over 4
543e71b7053SJung-uk Kim
544e71b7053SJung-uk Kim=item B<SSL_CONF_TYPE_UNKNOWN>
545e71b7053SJung-uk Kim
546e71b7053SJung-uk KimThe B<cmd> string is unrecognised, this return value can be use to flag
547e71b7053SJung-uk Kimsyntax errors.
548e71b7053SJung-uk Kim
549e71b7053SJung-uk Kim=item B<SSL_CONF_TYPE_STRING>
550e71b7053SJung-uk Kim
551e71b7053SJung-uk KimThe value is a string without any specific structure.
552e71b7053SJung-uk Kim
553e71b7053SJung-uk Kim=item B<SSL_CONF_TYPE_FILE>
554e71b7053SJung-uk Kim
555e71b7053SJung-uk KimThe value is a filename.
556e71b7053SJung-uk Kim
557e71b7053SJung-uk Kim=item B<SSL_CONF_TYPE_DIR>
558e71b7053SJung-uk Kim
559e71b7053SJung-uk KimThe value is a directory name.
560e71b7053SJung-uk Kim
561e71b7053SJung-uk Kim=item B<SSL_CONF_TYPE_NONE>
562e71b7053SJung-uk Kim
563e71b7053SJung-uk KimThe value string is not used e.g. a command line option which doesn't take an
564e71b7053SJung-uk Kimargument.
565e71b7053SJung-uk Kim
566e71b7053SJung-uk Kim=back
567e71b7053SJung-uk Kim
568e71b7053SJung-uk Kim=head1 NOTES
569e71b7053SJung-uk Kim
570e71b7053SJung-uk KimThe order of operations is significant. This can be used to set either defaults
571e71b7053SJung-uk Kimor values which cannot be overridden. For example if an application calls:
572e71b7053SJung-uk Kim
573e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Protocol", "-SSLv3");
574e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, userparam, uservalue);
575e71b7053SJung-uk Kim
576e71b7053SJung-uk Kimit will disable SSLv3 support by default but the user can override it. If
577e71b7053SJung-uk Kimhowever the call sequence is:
578e71b7053SJung-uk Kim
579e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, userparam, uservalue);
580e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Protocol", "-SSLv3");
581e71b7053SJung-uk Kim
582e71b7053SJung-uk KimSSLv3 is B<always> disabled and attempt to override this by the user are
583e71b7053SJung-uk Kimignored.
584e71b7053SJung-uk Kim
585e71b7053SJung-uk KimBy checking the return code of SSL_CONF_cmd() it is possible to query if a
586e71b7053SJung-uk Kimgiven B<cmd> is recognised, this is useful if SSL_CONF_cmd() values are
587e71b7053SJung-uk Kimmixed with additional application specific operations.
588e71b7053SJung-uk Kim
589e71b7053SJung-uk KimFor example an application might call SSL_CONF_cmd() and if it returns
590e71b7053SJung-uk Kim-2 (unrecognised command) continue with processing of application specific
591e71b7053SJung-uk Kimcommands.
592e71b7053SJung-uk Kim
593e71b7053SJung-uk KimApplications can also use SSL_CONF_cmd() to process command lines though the
594e71b7053SJung-uk Kimutility function SSL_CONF_cmd_argv() is normally used instead. One way
595e71b7053SJung-uk Kimto do this is to set the prefix to an appropriate value using
596e71b7053SJung-uk KimSSL_CONF_CTX_set1_prefix(), pass the current argument to B<cmd> and the
597e71b7053SJung-uk Kimfollowing argument to B<value> (which may be NULL).
598e71b7053SJung-uk Kim
599e71b7053SJung-uk KimIn this case if the return value is positive then it is used to skip that
600e71b7053SJung-uk Kimnumber of arguments as they have been processed by SSL_CONF_cmd(). If -2 is
601e71b7053SJung-uk Kimreturned then B<cmd> is not recognised and application specific arguments
602e71b7053SJung-uk Kimcan be checked instead. If -3 is returned a required argument is missing
603e71b7053SJung-uk Kimand an error is indicated. If 0 is returned some other error occurred and
604e71b7053SJung-uk Kimthis can be reported back to the user.
605e71b7053SJung-uk Kim
606e71b7053SJung-uk KimThe function SSL_CONF_cmd_value_type() can be used by applications to
607e71b7053SJung-uk Kimcheck for the existence of a command or to perform additional syntax
608e71b7053SJung-uk Kimchecking or translation of the command value. For example if the return
609e71b7053SJung-uk Kimvalue is B<SSL_CONF_TYPE_FILE> an application could translate a relative
610e71b7053SJung-uk Kimpathname to an absolute pathname.
611e71b7053SJung-uk Kim
612610a21fdSJung-uk Kim=head1 RETURN VALUES
613610a21fdSJung-uk Kim
614610a21fdSJung-uk KimSSL_CONF_cmd() returns 1 if the value of B<cmd> is recognised and B<value> is
615610a21fdSJung-uk KimB<NOT> used and 2 if both B<cmd> and B<value> are used. In other words it
616610a21fdSJung-uk Kimreturns the number of arguments processed. This is useful when processing
617610a21fdSJung-uk Kimcommand lines.
618610a21fdSJung-uk Kim
619610a21fdSJung-uk KimA return value of -2 means B<cmd> is not recognised.
620610a21fdSJung-uk Kim
621610a21fdSJung-uk KimA return value of -3 means B<cmd> is recognised and the command requires a
622610a21fdSJung-uk Kimvalue but B<value> is NULL.
623610a21fdSJung-uk Kim
624610a21fdSJung-uk KimA return code of 0 indicates that both B<cmd> and B<value> are valid but an
625610a21fdSJung-uk Kimerror occurred attempting to perform the operation: for example due to an
626610a21fdSJung-uk Kimerror in the syntax of B<value> in this case the error queue may provide
627610a21fdSJung-uk Kimadditional information.
628610a21fdSJung-uk Kim
629e71b7053SJung-uk Kim=head1 EXAMPLES
630e71b7053SJung-uk Kim
631e71b7053SJung-uk KimSet supported signature algorithms:
632e71b7053SJung-uk Kim
633e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "SignatureAlgorithms", "ECDSA+SHA256:RSA+SHA256:DSA+SHA256");
634e71b7053SJung-uk Kim
635e71b7053SJung-uk KimThere are various ways to select the supported protocols.
636e71b7053SJung-uk Kim
637e71b7053SJung-uk KimThis set the minimum protocol version to TLSv1, and so disables SSLv3.
638e71b7053SJung-uk KimThis is the recommended way to disable protocols.
639e71b7053SJung-uk Kim
640e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1");
641e71b7053SJung-uk Kim
642e71b7053SJung-uk KimThe following also disables SSLv3:
643e71b7053SJung-uk Kim
644e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Protocol", "-SSLv3");
645e71b7053SJung-uk Kim
646e71b7053SJung-uk KimThe following will first enable all protocols, and then disable
647e71b7053SJung-uk KimSSLv3.
648e71b7053SJung-uk KimIf no protocol versions were disabled before this has the same effect as
649e71b7053SJung-uk Kim"-SSLv3", but if some versions were disables this will re-enable them before
650e71b7053SJung-uk Kimdisabling SSLv3.
651e71b7053SJung-uk Kim
652e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Protocol", "ALL,-SSLv3");
653e71b7053SJung-uk Kim
654e71b7053SJung-uk KimOnly enable TLSv1.2:
655e71b7053SJung-uk Kim
656e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "MinProtocol", "TLSv1.2");
657e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "MaxProtocol", "TLSv1.2");
658e71b7053SJung-uk Kim
659e71b7053SJung-uk KimThis also only enables TLSv1.2:
660e71b7053SJung-uk Kim
661e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Protocol", "-ALL,TLSv1.2");
662e71b7053SJung-uk Kim
663e71b7053SJung-uk KimDisable TLS session tickets:
664e71b7053SJung-uk Kim
665e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Options", "-SessionTicket");
666e71b7053SJung-uk Kim
667e71b7053SJung-uk KimEnable compression:
668e71b7053SJung-uk Kim
669e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Options", "Compression");
670e71b7053SJung-uk Kim
671e71b7053SJung-uk KimSet supported curves to P-256, P-384:
672e71b7053SJung-uk Kim
673e71b7053SJung-uk Kim SSL_CONF_cmd(ctx, "Curves", "P-256:P-384");
674e71b7053SJung-uk Kim
675e71b7053SJung-uk Kim=head1 SEE ALSO
676e71b7053SJung-uk Kim
677e71b7053SJung-uk KimL<SSL_CONF_CTX_new(3)>,
678e71b7053SJung-uk KimL<SSL_CONF_CTX_set_flags(3)>,
679e71b7053SJung-uk KimL<SSL_CONF_CTX_set1_prefix(3)>,
680e71b7053SJung-uk KimL<SSL_CONF_CTX_set_ssl_ctx(3)>,
681e71b7053SJung-uk KimL<SSL_CONF_cmd_argv(3)>,
682e71b7053SJung-uk KimL<SSL_CTX_set_options(3)>
683e71b7053SJung-uk Kim
684e71b7053SJung-uk Kim=head1 HISTORY
685e71b7053SJung-uk Kim
6866935a639SJung-uk KimThe SSL_CONF_cmd() function was added in OpenSSL 1.0.2.
687e71b7053SJung-uk Kim
6886935a639SJung-uk KimThe B<SSL_OP_NO_SSL2> option doesn't have effect since 1.1.0, but the macro
6896935a639SJung-uk Kimis retained for backwards compatibility.
690e71b7053SJung-uk Kim
6916935a639SJung-uk KimThe B<SSL_CONF_TYPE_NONE> was added in OpenSSL 1.1.0. In earlier versions of
692e71b7053SJung-uk KimOpenSSL passing a command which didn't take an argument would return
693e71b7053SJung-uk KimB<SSL_CONF_TYPE_UNKNOWN>.
694e71b7053SJung-uk Kim
695e71b7053SJung-uk KimB<MinProtocol> and B<MaxProtocol> where added in OpenSSL 1.1.0.
696e71b7053SJung-uk Kim
697e71b7053SJung-uk KimB<AllowNoDHEKEX> and B<PrioritizeChaCha> were added in OpenSSL 1.1.1.
698e71b7053SJung-uk Kim
699e71b7053SJung-uk Kim=head1 COPYRIGHT
700e71b7053SJung-uk Kim
70158f35182SJung-uk KimCopyright 2012-2020 The OpenSSL Project Authors. All Rights Reserved.
702e71b7053SJung-uk Kim
703e71b7053SJung-uk KimLicensed under the OpenSSL license (the "License").  You may not use
704e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
705e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
706e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
707e71b7053SJung-uk Kim
708e71b7053SJung-uk Kim=cut
709