diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/man/SSL_CTX_set_options.3 | 215 |
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 |
| 33 | Note: all these functions are implemented using macros. | ||
| 34 | .Pp | ||
| 35 | .Fn SSL_CTX_set_options | 83 | .Fn SSL_CTX_set_options |
| 36 | adds the options set via bitmask in | 84 | adds 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 |
| 70 | indicates whether the peer supports secure renegotiation. | 118 | indicates whether the peer supports secure renegotiation. |
| 71 | .Sh NOTES | 119 | .Pp |
| 120 | All these functions are implemented using macros. | ||
| 121 | .Pp | ||
| 72 | The behaviour of the SSL library can be changed by setting several options. | 122 | The behaviour of the SSL library can be changed by setting several options. |
| 73 | The options are coded as bitmasks and can be combined by a bitwise OR | 123 | The options are coded as bitmasks and can be combined by a bitwise OR |
| 74 | operation (|). | 124 | operation (|). |
| @@ -99,42 +149,8 @@ The following | |||
| 99 | .Em bug workaround | 149 | .Em bug workaround |
| 100 | options are available: | 150 | options are available: |
| 101 | .Bl -tag -width Ds | 151 | .Bl -tag -width Ds |
| 102 | .It Dv SSL_OP_MICROSOFT_SESS_ID_BUG | ||
| 103 | As of | ||
| 104 | .Ox 5.8 , | ||
| 105 | this option has no effect. | ||
| 106 | .It Dv SSL_OP_NETSCAPE_CHALLENGE_BUG | ||
| 107 | As of | ||
| 108 | .Ox 5.8 , | ||
| 109 | this option has no effect. | ||
| 110 | .It Dv SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG | ||
| 111 | As of OpenSSL 0.9.8q and 1.0.0c, this option has no effect. | ||
| 112 | .It Dv SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG | ||
| 113 | As of | ||
| 114 | .Ox 5.8 , | ||
| 115 | this option has no effect. | ||
| 116 | .It Dv SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER | ||
| 117 | As of | ||
| 118 | .Ox 5.8 , | ||
| 119 | this option has no effect. | ||
| 120 | .It Dv SSL_OP_SAFARI_ECDHE_ECDSA_BUG | ||
| 121 | As of | ||
| 122 | .Ox 5.8 , | ||
| 123 | this option has no effect. | ||
| 124 | .It Dv SSL_OP_SSLEAY_080_CLIENT_DH_BUG | ||
| 125 | As of | ||
| 126 | .Ox 5.8 , | ||
| 127 | this option has no effect. | ||
| 128 | .It Dv SSL_OP_TLS_D5_BUG | ||
| 129 | As of | ||
| 130 | .Ox 5.8 , | ||
| 131 | this option has no effect. | ||
| 132 | .It Dv SSL_OP_TLS_BLOCK_PADDING_BUG | ||
| 133 | As of | ||
| 134 | .Ox 5.8 , | ||
| 135 | this option has no effect. | ||
| 136 | .It Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS | 152 | .It Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS |
| 137 | Disables a countermeasure against a SSL 3.0/TLS 1.0 protocol vulnerability | 153 | Disables a countermeasure against a TLS 1.0 protocol vulnerability |
| 138 | affecting CBC ciphers, which cannot be handled by some broken SSL | 154 | affecting CBC ciphers, which cannot be handled by some broken SSL |
| 139 | implementations. | 155 | implementations. |
| 140 | This option has no effect for connections using other ciphers. | 156 | This option has no effect for connections using other ciphers. |
| @@ -166,53 +182,11 @@ the server only understands up to SSLv3. | |||
| 166 | In this case the client must still use the same SSLv3.1=TLSv1 announcement. | 182 | In this case the client must still use the same SSLv3.1=TLSv1 announcement. |
| 167 | Some clients step down to SSLv3 with respect to the server's answer and violate | 183 | Some clients step down to SSLv3 with respect to the server's answer and violate |
| 168 | the version rollback protection.) | 184 | the version rollback protection.) |
| 169 | .It Dv SSL_OP_SINGLE_DH_USE | ||
| 170 | Always create a new key when using temporary/ephemeral DH parameters | ||
| 171 | (see | ||
| 172 | .Xr SSL_CTX_set_tmp_dh_callback 3 ) . | ||
| 173 | This option must be used to prevent small subgroup attacks, when the DH | ||
| 174 | parameters were not generated using | ||
| 175 | .Dq strong | ||
| 176 | primes (e.g., when using DSA-parameters, see | ||
| 177 | .Xr openssl 1 ) . | ||
| 178 | If | ||
| 179 | .Dq strong | ||
| 180 | primes were used, it is not strictly necessary to generate a new DH key during | ||
| 181 | each handshake but it is also recommended. | ||
| 182 | .Dv SSL_OP_SINGLE_DH_USE | ||
| 183 | should therefore be enabled whenever temporary/ephemeral DH parameters are used. | ||
| 184 | .It SSL_OP_EPHEMERAL_RSA | ||
| 185 | Always use ephemeral (temporary) RSA key when doing RSA operations (see | ||
| 186 | .Xr SSL_CTX_set_tmp_rsa_callback 3 ) . | ||
| 187 | According to the specifications, this is only done when a RSA key can only be | ||
| 188 | used for signature operations (namely under export ciphers with restricted RSA | ||
| 189 | keylength). | ||
| 190 | By setting this option, ephemeral RSA keys are always used. | ||
| 191 | This option breaks compatibility with the SSL/TLS specifications and may lead | ||
| 192 | to interoperability problems with clients and should therefore never be used. | ||
| 193 | Ciphers 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 |
| 195 | When choosing a cipher, use the server's preferences instead of the client | 186 | When choosing a cipher, use the server's preferences instead of the client |
| 196 | preferences. | 187 | preferences. |
| 197 | When not set, the SSL server will always follow the client's preferences. | 188 | When not set, the server will always follow the client's preferences. |
| 198 | When set, the SSLv3/TLSv1 server will choose following its own preferences. | 189 | When set, the server will choose following its own preferences. |
| 199 | Because of the different protocol, for SSLv2 the server will send its list of | ||
| 200 | preferences to the client and the client chooses. | ||
| 201 | .It Dv SSL_OP_NETSCAPE_CA_DN_BUG | ||
| 202 | As of | ||
| 203 | .Ox 5.8 , | ||
| 204 | this option has no effect. | ||
| 205 | .It Dv SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG | ||
| 206 | As of | ||
| 207 | .Ox 5.8 , | ||
| 208 | this option has no effect. | ||
| 209 | .It Dv SSL_OP_NO_SSLv2 | ||
| 210 | As of | ||
| 211 | .Ox 5.6 , | ||
| 212 | this option has no effect as SSLv2 support has been removed. | ||
| 213 | In previous versions it disabled use of the SSLv2 protocol. | ||
| 214 | .It Dv SSL_OP_NO_SSLv3 | ||
| 215 | Do not use the SSLv3 protocol. | ||
| 216 | .It Dv SSL_OP_NO_TLSv1 | 190 | .It Dv SSL_OP_NO_TLSv1 |
| 217 | Do not use the TLSv1.0 protocol. | 191 | Do 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 |
| 230 | If this option is set this functionality is disabled and tickets will not be | 204 | If this option is set this functionality is disabled and tickets will not be |
| 231 | used by clients or servers. | 205 | used by clients or servers. |
| 232 | .It Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION | ||
| 233 | As of | ||
| 234 | .Ox 5.6 , | ||
| 235 | this option has no effect. | ||
| 236 | In previous versions it allowed legacy insecure renegotiation between OpenSSL | ||
| 237 | and unpatched clients or servers. | ||
| 238 | See the | ||
| 239 | .Sx SECURE RENEGOTIATION | ||
| 240 | section for more details. | ||
| 241 | .It Dv SSL_OP_LEGACY_SERVER_CONNECT | 206 | .It Dv SSL_OP_LEGACY_SERVER_CONNECT |
| 242 | Allow legacy insecure renegotiation between OpenSSL and unpatched servers | 207 | Allow 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 |
| 247 | section for more details. | 212 | section for more details. |
| 248 | .El | 213 | .El |
| 214 | .Pp | ||
| 215 | The following options used to be supported at some point in the past | ||
| 216 | and 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 |
| 250 | OpenSSL 0.9.8m and later always attempts to use secure renegotiation as | 236 | OpenSSL 0.9.8m and later always attempts to use secure renegotiation as |
| 251 | described in RFC5746. | 237 | described in RFC5746. |
| 252 | This counters the prefix attack described in CVE-2009-3555 and elsewhere. | 238 | This counters the prefix attack described in CVE-2009-3555 and elsewhere. |
| 253 | .Pp | 239 | .Pp |
| 254 | The deprecated and highly broken SSLv2 protocol does not support renegotiation | ||
| 255 | at all; its use is | ||
| 256 | .Em strongly | ||
| 257 | discouraged. | ||
| 258 | .Pp | ||
| 259 | This attack has far-reaching consequences which application writers should be | 240 | This attack has far-reaching consequences which application writers should be |
| 260 | aware of. | 241 | aware of. |
| 261 | In the description below an implementation supporting secure renegotiation is | 242 | In the description below an implementation supporting secure renegotiation is |
| @@ -273,9 +254,7 @@ Connections and renegotiation are always permitted by OpenSSL implementations. | |||
| 273 | The initial connection succeeds but client renegotiation is denied by the | 254 | The initial connection succeeds but client renegotiation is denied by the |
| 274 | server with a | 255 | server with a |
| 275 | .Em no_renegotiation | 256 | .Em no_renegotiation |
| 276 | warning alert if TLS v1.0 is used or a fatal | 257 | warning alert. |
| 277 | .Em handshake_failure | ||
| 278 | alert in SSL v3.0. | ||
| 279 | .Pp | 258 | .Pp |
| 280 | If the patched OpenSSL server attempts to renegotiate a fatal | 259 | If 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. | |||
| 320 | OpenSSL client applications wishing to ensure they can connect to unpatched | 299 | OpenSSL client applications wishing to ensure they can connect to unpatched |
| 321 | servers should always | 300 | servers 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 |
| 325 | OpenSSL client applications that want to ensure they can | 304 | OpenSSL 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 | ||
| 363 | and | ||
| 364 | .Dv SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION | ||
| 365 | have been added in | ||
| 366 | OpenSSL 0.9.7. | ||
| 367 | .Pp | ||
| 368 | .Dv SSL_OP_TLS_ROLLBACK_BUG | ||
| 369 | has been added in OpenSSL 0.9.6 and was automatically enabled with | ||
| 370 | .Dv SSL_OP_ALL . | ||
| 371 | As of 0.9.7, it is no longer included in | ||
| 372 | .Dv SSL_OP_ALL | ||
| 373 | and must be explicitly set. | ||
| 374 | .Pp | ||
| 375 | .Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS | ||
| 376 | has been added in OpenSSL 0.9.6e. | ||
| 377 | Versions up to OpenSSL 0.9.6c do not include the countermeasure that can be | ||
| 378 | disabled 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 |
| 381 | and | 340 | and |
| 382 | .Fn SSL_clear_options | 341 | .Fn SSL_clear_options |
| 383 | were first added in OpenSSL 0.9.8m. | 342 | were first added in OpenSSL 0.9.8m. |
| 384 | .Pp | ||
| 385 | .Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION , | ||
| 386 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
| 387 | and the function | ||
| 388 | .Fn SSL_get_secure_renegotiation_support | ||
| 389 | were first added in OpenSSL 0.9.8m. | ||
| 390 | .Pp | ||
| 391 | .Dv SSL_OP_NO_SSLv2 | ||
| 392 | and | ||
| 393 | .Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION | ||
| 394 | were changed to have no effect in | ||
| 395 | .Ox 5.6 . | ||
