summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/man/SSL_CTX_set_options.3215
1 files changed, 81 insertions, 134 deletions
diff --git a/src/lib/libssl/man/SSL_CTX_set_options.3 b/src/lib/libssl/man/SSL_CTX_set_options.3
index 1818be0d86..a066229402 100644
--- a/src/lib/libssl/man/SSL_CTX_set_options.3
+++ b/src/lib/libssl/man/SSL_CTX_set_options.3
@@ -1,7 +1,57 @@
1.\" $OpenBSD: SSL_CTX_set_options.3,v 1.2 2016/12/01 15:40:14 schwarze Exp $
2.\" OpenSSL 361a1191 Dec 6 17:56:41 2015 +0100
1.\" 3.\"
2.\" $OpenBSD: SSL_CTX_set_options.3,v 1.1 2016/11/05 15:32:19 schwarze Exp $ 4.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>,
5.\" Bodo Moeller <bodo@openssl.org>, and
6.\" Dr. Stephen Henson <steve@openssl.org>.
7.\" Copyright (c) 2001-2003, 2005, 2007, 2009, 2010, 2013-2015
8.\" The OpenSSL Project. All rights reserved.
3.\" 9.\"
4.Dd $Mdocdate: November 5 2016 $ 10.\" Redistribution and use in source and binary forms, with or without
11.\" modification, are permitted provided that the following conditions
12.\" are met:
13.\"
14.\" 1. Redistributions of source code must retain the above copyright
15.\" notice, this list of conditions and the following disclaimer.
16.\"
17.\" 2. Redistributions in binary form must reproduce the above copyright
18.\" notice, this list of conditions and the following disclaimer in
19.\" the documentation and/or other materials provided with the
20.\" distribution.
21.\"
22.\" 3. All advertising materials mentioning features or use of this
23.\" software must display the following acknowledgment:
24.\" "This product includes software developed by the OpenSSL Project
25.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
26.\"
27.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
28.\" endorse or promote products derived from this software without
29.\" prior written permission. For written permission, please contact
30.\" openssl-core@openssl.org.
31.\"
32.\" 5. Products derived from this software may not be called "OpenSSL"
33.\" nor may "OpenSSL" appear in their names without prior written
34.\" permission of the OpenSSL Project.
35.\"
36.\" 6. Redistributions of any form whatsoever must retain the following
37.\" acknowledgment:
38.\" "This product includes software developed by the OpenSSL Project
39.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
40.\"
41.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
42.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
44.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
45.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
46.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
47.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
48.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
49.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
50.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
51.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
52.\" OF THE POSSIBILITY OF SUCH DAMAGE.
53.\"
54.Dd $Mdocdate: December 1 2016 $
5.Dt SSL_CTX_SET_OPTIONS 3 55.Dt SSL_CTX_SET_OPTIONS 3
6.Os 56.Os
7.Sh NAME 57.Sh NAME
@@ -30,8 +80,6 @@
30.Ft long 80.Ft long
31.Fn SSL_get_secure_renegotiation_support "SSL *ssl" 81.Fn SSL_get_secure_renegotiation_support "SSL *ssl"
32.Sh DESCRIPTION 82.Sh DESCRIPTION
33Note: all these functions are implemented using macros.
34.Pp
35.Fn SSL_CTX_set_options 83.Fn SSL_CTX_set_options
36adds the options set via bitmask in 84adds the options set via bitmask in
37.Fa options 85.Fa options
@@ -68,7 +116,9 @@ returns the options set for
68.Pp 116.Pp
69.Fn SSL_get_secure_renegotiation_support 117.Fn SSL_get_secure_renegotiation_support
70indicates whether the peer supports secure renegotiation. 118indicates whether the peer supports secure renegotiation.
71.Sh NOTES 119.Pp
120All these functions are implemented using macros.
121.Pp
72The behaviour of the SSL library can be changed by setting several options. 122The behaviour of the SSL library can be changed by setting several options.
73The options are coded as bitmasks and can be combined by a bitwise OR 123The options are coded as bitmasks and can be combined by a bitwise OR
74operation (|). 124operation (|).
@@ -99,42 +149,8 @@ The following
99.Em bug workaround 149.Em bug workaround
100options are available: 150options are available:
101.Bl -tag -width Ds 151.Bl -tag -width Ds
102.It Dv SSL_OP_MICROSOFT_SESS_ID_BUG
103As of
104.Ox 5.8 ,
105this option has no effect.
106.It Dv SSL_OP_NETSCAPE_CHALLENGE_BUG
107As of
108.Ox 5.8 ,
109this option has no effect.
110.It Dv SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG
111As of OpenSSL 0.9.8q and 1.0.0c, this option has no effect.
112.It Dv SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG
113As of
114.Ox 5.8 ,
115this option has no effect.
116.It Dv SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER
117As of
118.Ox 5.8 ,
119this option has no effect.
120.It Dv SSL_OP_SAFARI_ECDHE_ECDSA_BUG
121As of
122.Ox 5.8 ,
123this option has no effect.
124.It Dv SSL_OP_SSLEAY_080_CLIENT_DH_BUG
125As of
126.Ox 5.8 ,
127this option has no effect.
128.It Dv SSL_OP_TLS_D5_BUG
129As of
130.Ox 5.8 ,
131this option has no effect.
132.It Dv SSL_OP_TLS_BLOCK_PADDING_BUG
133As of
134.Ox 5.8 ,
135this option has no effect.
136.It Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 152.It Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
137Disables a countermeasure against a SSL 3.0/TLS 1.0 protocol vulnerability 153Disables a countermeasure against a TLS 1.0 protocol vulnerability
138affecting CBC ciphers, which cannot be handled by some broken SSL 154affecting CBC ciphers, which cannot be handled by some broken SSL
139implementations. 155implementations.
140This option has no effect for connections using other ciphers. 156This option has no effect for connections using other ciphers.
@@ -166,53 +182,11 @@ the server only understands up to SSLv3.
166In this case the client must still use the same SSLv3.1=TLSv1 announcement. 182In this case the client must still use the same SSLv3.1=TLSv1 announcement.
167Some clients step down to SSLv3 with respect to the server's answer and violate 183Some clients step down to SSLv3 with respect to the server's answer and violate
168the version rollback protection.) 184the version rollback protection.)
169.It Dv SSL_OP_SINGLE_DH_USE
170Always create a new key when using temporary/ephemeral DH parameters
171(see
172.Xr SSL_CTX_set_tmp_dh_callback 3 ) .
173This option must be used to prevent small subgroup attacks, when the DH
174parameters were not generated using
175.Dq strong
176primes (e.g., when using DSA-parameters, see
177.Xr openssl 1 ) .
178If
179.Dq strong
180primes were used, it is not strictly necessary to generate a new DH key during
181each handshake but it is also recommended.
182.Dv SSL_OP_SINGLE_DH_USE
183should therefore be enabled whenever temporary/ephemeral DH parameters are used.
184.It SSL_OP_EPHEMERAL_RSA
185Always use ephemeral (temporary) RSA key when doing RSA operations (see
186.Xr SSL_CTX_set_tmp_rsa_callback 3 ) .
187According to the specifications, this is only done when a RSA key can only be
188used for signature operations (namely under export ciphers with restricted RSA
189keylength).
190By setting this option, ephemeral RSA keys are always used.
191This option breaks compatibility with the SSL/TLS specifications and may lead
192to interoperability problems with clients and should therefore never be used.
193Ciphers with EDH (ephemeral Diffie-Hellman) key exchange should be used instead.
194.It Dv SSL_OP_CIPHER_SERVER_PREFERENCE 185.It Dv SSL_OP_CIPHER_SERVER_PREFERENCE
195When choosing a cipher, use the server's preferences instead of the client 186When choosing a cipher, use the server's preferences instead of the client
196preferences. 187preferences.
197When not set, the SSL server will always follow the client's preferences. 188When not set, the server will always follow the client's preferences.
198When set, the SSLv3/TLSv1 server will choose following its own preferences. 189When set, the server will choose following its own preferences.
199Because of the different protocol, for SSLv2 the server will send its list of
200preferences to the client and the client chooses.
201.It Dv SSL_OP_NETSCAPE_CA_DN_BUG
202As of
203.Ox 5.8 ,
204this option has no effect.
205.It Dv SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG
206As of
207.Ox 5.8 ,
208this option has no effect.
209.It Dv SSL_OP_NO_SSLv2
210As of
211.Ox 5.6 ,
212this option has no effect as SSLv2 support has been removed.
213In previous versions it disabled use of the SSLv2 protocol.
214.It Dv SSL_OP_NO_SSLv3
215Do not use the SSLv3 protocol.
216.It Dv SSL_OP_NO_TLSv1 190.It Dv SSL_OP_NO_TLSv1
217Do not use the TLSv1.0 protocol. 191Do not use the TLSv1.0 protocol.
218.It Dv SSL_OP_NO_TLSv1_1 192.It Dv SSL_OP_NO_TLSv1_1
@@ -229,15 +203,6 @@ RFC4507bis tickets for stateless session resumption.
229.Pp 203.Pp
230If this option is set this functionality is disabled and tickets will not be 204If this option is set this functionality is disabled and tickets will not be
231used by clients or servers. 205used by clients or servers.
232.It Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
233As of
234.Ox 5.6 ,
235this option has no effect.
236In previous versions it allowed legacy insecure renegotiation between OpenSSL
237and unpatched clients or servers.
238See the
239.Sx SECURE RENEGOTIATION
240section for more details.
241.It Dv SSL_OP_LEGACY_SERVER_CONNECT 206.It Dv SSL_OP_LEGACY_SERVER_CONNECT
242Allow legacy insecure renegotiation between OpenSSL and unpatched servers 207Allow legacy insecure renegotiation between OpenSSL and unpatched servers
243.Em only : 208.Em only :
@@ -246,16 +211,32 @@ See the
246.Sx SECURE RENEGOTIATION 211.Sx SECURE RENEGOTIATION
247section for more details. 212section for more details.
248.El 213.El
214.Pp
215The following options used to be supported at some point in the past
216and no longer have any effect:
217.Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION ,
218.Dv SSL_OP_EPHEMERAL_RSA ,
219.Dv SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER ,
220.Dv SSL_OP_MICROSOFT_SESS_ID_BUG ,
221.Dv SSL_OP_NETSCAPE_CA_DN_BUG ,
222.Dv SSL_OP_NETSCAPE_CHALLENGE_BUG ,
223.Dv SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG ,
224.Dv SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG ,
225.Dv SSL_OP_NO_SSLv2 ,
226.Dv SSL_OP_NO_SSLv3 ,
227.Dv SSL_OP_PKCS1_CHECK_1 ,
228.Dv SSL_OP_PKCS1_CHECK_2 ,
229.Dv SSL_OP_SAFARI_ECDHE_ECDSA_BUG ,
230.Dv SSL_OP_SINGLE_DH_USE ,
231.Dv SSL_OP_SSLEAY_080_CLIENT_DH_BUG ,
232.Dv SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG ,
233.Dv SSL_OP_TLS_BLOCK_PADDING_BUG ,
234.Dv SSL_OP_TLS_D5_BUG .
249.Sh SECURE RENEGOTIATION 235.Sh SECURE RENEGOTIATION
250OpenSSL 0.9.8m and later always attempts to use secure renegotiation as 236OpenSSL 0.9.8m and later always attempts to use secure renegotiation as
251described in RFC5746. 237described in RFC5746.
252This counters the prefix attack described in CVE-2009-3555 and elsewhere. 238This counters the prefix attack described in CVE-2009-3555 and elsewhere.
253.Pp 239.Pp
254The deprecated and highly broken SSLv2 protocol does not support renegotiation
255at all; its use is
256.Em strongly
257discouraged.
258.Pp
259This attack has far-reaching consequences which application writers should be 240This attack has far-reaching consequences which application writers should be
260aware of. 241aware of.
261In the description below an implementation supporting secure renegotiation is 242In the description below an implementation supporting secure renegotiation is
@@ -273,9 +254,7 @@ Connections and renegotiation are always permitted by OpenSSL implementations.
273The initial connection succeeds but client renegotiation is denied by the 254The initial connection succeeds but client renegotiation is denied by the
274server with a 255server with a
275.Em no_renegotiation 256.Em no_renegotiation
276warning alert if TLS v1.0 is used or a fatal 257warning alert.
277.Em handshake_failure
278alert in SSL v3.0.
279.Pp 258.Pp
280If the patched OpenSSL server attempts to renegotiate a fatal 259If the patched OpenSSL server attempts to renegotiate a fatal
281.Em handshake_failure 260.Em handshake_failure
@@ -320,7 +299,7 @@ be set by default in a future version of OpenSSL.
320OpenSSL client applications wishing to ensure they can connect to unpatched 299OpenSSL client applications wishing to ensure they can connect to unpatched
321servers should always 300servers should always
322.Em set 301.Em set
323.Dv SSL_OP_LEGACY_SERVER_CONNECT 302.Dv SSL_OP_LEGACY_SERVER_CONNECT .
324.Pp 303.Pp
325OpenSSL client applications that want to ensure they can 304OpenSSL client applications that want to ensure they can
326.Em not 305.Em not
@@ -355,41 +334,9 @@ returns 1 is the peer supports secure renegotiation and 0 if it does not.
355.Xr openssl 1 , 334.Xr openssl 1 ,
356.Xr ssl 3 , 335.Xr ssl 3 ,
357.Xr SSL_clear 3 , 336.Xr SSL_clear 3 ,
358.Xr SSL_CTX_set_tmp_dh_callback 3 ,
359.Xr SSL_CTX_set_tmp_rsa_callback 3 ,
360.Xr SSL_new 3 337.Xr SSL_new 3
361.Sh HISTORY 338.Sh HISTORY
362.Dv SSL_OP_CIPHER_SERVER_PREFERENCE
363and
364.Dv SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION
365have been added in
366OpenSSL 0.9.7.
367.Pp
368.Dv SSL_OP_TLS_ROLLBACK_BUG
369has been added in OpenSSL 0.9.6 and was automatically enabled with
370.Dv SSL_OP_ALL .
371As of 0.9.7, it is no longer included in
372.Dv SSL_OP_ALL
373and must be explicitly set.
374.Pp
375.Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS
376has been added in OpenSSL 0.9.6e.
377Versions up to OpenSSL 0.9.6c do not include the countermeasure that can be
378disabled with this option (in OpenSSL 0.9.6d, it was always enabled).
379.Pp
380.Fn SSL_CTX_clear_options 339.Fn SSL_CTX_clear_options
381and 340and
382.Fn SSL_clear_options 341.Fn SSL_clear_options
383were first added in OpenSSL 0.9.8m. 342were first added in OpenSSL 0.9.8m.
384.Pp
385.Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION ,
386.Dv SSL_OP_LEGACY_SERVER_CONNECT
387and the function
388.Fn SSL_get_secure_renegotiation_support
389were first added in OpenSSL 0.9.8m.
390.Pp
391.Dv SSL_OP_NO_SSLv2
392and
393.Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION
394were changed to have no effect in
395.Ox 5.6 .