diff options
Diffstat (limited to 'src/lib/libssl/man/SSL_CTX_set_options.3')
| -rw-r--r-- | src/lib/libssl/man/SSL_CTX_set_options.3 | 374 |
1 files changed, 0 insertions, 374 deletions
diff --git a/src/lib/libssl/man/SSL_CTX_set_options.3 b/src/lib/libssl/man/SSL_CTX_set_options.3 deleted file mode 100644 index 5df0b07785..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_options.3 +++ /dev/null | |||
| @@ -1,374 +0,0 @@ | |||
| 1 | .\" $OpenBSD: SSL_CTX_set_options.3,v 1.16 2022/03/31 17:27:18 naddy Exp $ | ||
| 2 | .\" full merge up to: OpenSSL 7946ab33 Dec 6 17:56:41 2015 +0100 | ||
| 3 | .\" selective merge up to: OpenSSL edb79c3a Mar 29 10:07:14 2017 +1000 | ||
| 4 | .\" | ||
| 5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>, | ||
| 6 | .\" Bodo Moeller <bodo@openssl.org>, and | ||
| 7 | .\" Dr. Stephen Henson <steve@openssl.org>. | ||
| 8 | .\" Copyright (c) 2001-2003, 2005, 2007, 2009, 2010, 2013-2015 | ||
| 9 | .\" The OpenSSL Project. All rights reserved. | ||
| 10 | .\" | ||
| 11 | .\" Redistribution and use in source and binary forms, with or without | ||
| 12 | .\" modification, are permitted provided that the following conditions | ||
| 13 | .\" are met: | ||
| 14 | .\" | ||
| 15 | .\" 1. Redistributions of source code must retain the above copyright | ||
| 16 | .\" notice, this list of conditions and the following disclaimer. | ||
| 17 | .\" | ||
| 18 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
| 19 | .\" notice, this list of conditions and the following disclaimer in | ||
| 20 | .\" the documentation and/or other materials provided with the | ||
| 21 | .\" distribution. | ||
| 22 | .\" | ||
| 23 | .\" 3. All advertising materials mentioning features or use of this | ||
| 24 | .\" software must display the following acknowledgment: | ||
| 25 | .\" "This product includes software developed by the OpenSSL Project | ||
| 26 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 27 | .\" | ||
| 28 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 29 | .\" endorse or promote products derived from this software without | ||
| 30 | .\" prior written permission. For written permission, please contact | ||
| 31 | .\" openssl-core@openssl.org. | ||
| 32 | .\" | ||
| 33 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
| 34 | .\" nor may "OpenSSL" appear in their names without prior written | ||
| 35 | .\" permission of the OpenSSL Project. | ||
| 36 | .\" | ||
| 37 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
| 38 | .\" acknowledgment: | ||
| 39 | .\" "This product includes software developed by the OpenSSL Project | ||
| 40 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 41 | .\" | ||
| 42 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 43 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 44 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 45 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 46 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 47 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 48 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 49 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 50 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 51 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 54 | .\" | ||
| 55 | .Dd $Mdocdate: March 31 2022 $ | ||
| 56 | .Dt SSL_CTX_SET_OPTIONS 3 | ||
| 57 | .Os | ||
| 58 | .Sh NAME | ||
| 59 | .Nm SSL_CTX_set_options , | ||
| 60 | .Nm SSL_set_options , | ||
| 61 | .Nm SSL_CTX_clear_options , | ||
| 62 | .Nm SSL_clear_options , | ||
| 63 | .Nm SSL_CTX_get_options , | ||
| 64 | .Nm SSL_get_options , | ||
| 65 | .Nm SSL_get_secure_renegotiation_support | ||
| 66 | .Nd manipulate SSL options | ||
| 67 | .Sh SYNOPSIS | ||
| 68 | .In openssl/ssl.h | ||
| 69 | .Ft long | ||
| 70 | .Fn SSL_CTX_set_options "SSL_CTX *ctx" "long options" | ||
| 71 | .Ft long | ||
| 72 | .Fn SSL_set_options "SSL *ssl" "long options" | ||
| 73 | .Ft long | ||
| 74 | .Fn SSL_CTX_clear_options "SSL_CTX *ctx" "long options" | ||
| 75 | .Ft long | ||
| 76 | .Fn SSL_clear_options "SSL *ssl" "long options" | ||
| 77 | .Ft long | ||
| 78 | .Fn SSL_CTX_get_options "SSL_CTX *ctx" | ||
| 79 | .Ft long | ||
| 80 | .Fn SSL_get_options "SSL *ssl" | ||
| 81 | .Ft long | ||
| 82 | .Fn SSL_get_secure_renegotiation_support "SSL *ssl" | ||
| 83 | .Sh DESCRIPTION | ||
| 84 | .Fn SSL_CTX_set_options | ||
| 85 | adds the options set via bitmask in | ||
| 86 | .Fa options | ||
| 87 | to | ||
| 88 | .Fa ctx . | ||
| 89 | Options already set before are not cleared! | ||
| 90 | .Pp | ||
| 91 | .Fn SSL_set_options | ||
| 92 | adds the options set via bitmask in | ||
| 93 | .Fa options | ||
| 94 | to | ||
| 95 | .Fa ssl . | ||
| 96 | Options already set before are not cleared! | ||
| 97 | .Pp | ||
| 98 | .Fn SSL_CTX_clear_options | ||
| 99 | clears the options set via bitmask in | ||
| 100 | .Fa options | ||
| 101 | to | ||
| 102 | .Fa ctx . | ||
| 103 | .Pp | ||
| 104 | .Fn SSL_clear_options | ||
| 105 | clears the options set via bitmask in | ||
| 106 | .Fa options | ||
| 107 | to | ||
| 108 | .Fa ssl . | ||
| 109 | .Pp | ||
| 110 | .Fn SSL_CTX_get_options | ||
| 111 | returns the options set for | ||
| 112 | .Fa ctx . | ||
| 113 | .Pp | ||
| 114 | .Fn SSL_get_options | ||
| 115 | returns the options set for | ||
| 116 | .Fa ssl . | ||
| 117 | .Pp | ||
| 118 | .Fn SSL_get_secure_renegotiation_support | ||
| 119 | indicates whether the peer supports secure renegotiation. | ||
| 120 | .Pp | ||
| 121 | All these functions are implemented using macros. | ||
| 122 | .Pp | ||
| 123 | The behaviour of the SSL library can be changed by setting several options. | ||
| 124 | The options are coded as bitmasks and can be combined by a bitwise OR | ||
| 125 | operation (|). | ||
| 126 | .Pp | ||
| 127 | .Fn SSL_CTX_set_options | ||
| 128 | and | ||
| 129 | .Fn SSL_set_options | ||
| 130 | affect the (external) protocol behaviour of the SSL library. | ||
| 131 | The (internal) behaviour of the API can be changed by using the similar | ||
| 132 | .Xr SSL_CTX_set_mode 3 | ||
| 133 | and | ||
| 134 | .Xr SSL_set_mode 3 | ||
| 135 | functions. | ||
| 136 | .Pp | ||
| 137 | During a handshake, the option settings of the SSL object are used. | ||
| 138 | When a new SSL object is created from a context using | ||
| 139 | .Xr SSL_new 3 , | ||
| 140 | the current option setting is copied. | ||
| 141 | Changes to | ||
| 142 | .Fa ctx | ||
| 143 | do not affect already created | ||
| 144 | .Vt SSL | ||
| 145 | objects. | ||
| 146 | .Fn SSL_clear | ||
| 147 | does not affect the settings. | ||
| 148 | .Pp | ||
| 149 | The following | ||
| 150 | .Em bug workaround | ||
| 151 | options are available: | ||
| 152 | .Bl -tag -width Ds | ||
| 153 | .It Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS | ||
| 154 | Disables a countermeasure against a TLS 1.0 protocol vulnerability | ||
| 155 | affecting CBC ciphers, which cannot be handled by some broken SSL | ||
| 156 | implementations. | ||
| 157 | This option has no effect for connections using other ciphers. | ||
| 158 | .It Dv SSL_OP_ALL | ||
| 159 | This is currently an alias for | ||
| 160 | .Dv SSL_OP_LEGACY_SERVER_CONNECT . | ||
| 161 | .El | ||
| 162 | .Pp | ||
| 163 | It is usually safe to use | ||
| 164 | .Dv SSL_OP_ALL | ||
| 165 | to enable the bug workaround options if compatibility with somewhat broken | ||
| 166 | implementations is desired. | ||
| 167 | .Pp | ||
| 168 | The following | ||
| 169 | .Em modifying | ||
| 170 | options are available: | ||
| 171 | .Bl -tag -width Ds | ||
| 172 | .It Dv SSL_OP_CIPHER_SERVER_PREFERENCE | ||
| 173 | When choosing a cipher, use the server's preferences instead of the client | ||
| 174 | preferences. | ||
| 175 | When not set, the server will always follow the client's preferences. | ||
| 176 | When set, the server will choose following its own preferences. | ||
| 177 | .It Dv SSL_OP_COOKIE_EXCHANGE | ||
| 178 | Turn on Cookie Exchange as described in RFC 4347 Section 4.2.1. | ||
| 179 | Only affects DTLS connections. | ||
| 180 | .It Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
| 181 | Allow legacy insecure renegotiation between OpenSSL and unpatched servers | ||
| 182 | .Em only : | ||
| 183 | this option is currently set by default. | ||
| 184 | See the | ||
| 185 | .Sx SECURE RENEGOTIATION | ||
| 186 | section for more details. | ||
| 187 | .It Dv SSL_OP_NO_DTLSv1 | ||
| 188 | Do not use the DTLSv1 protocol. | ||
| 189 | Deprecated; use | ||
| 190 | .Xr SSL_CTX_set_min_proto_version 3 | ||
| 191 | instead. | ||
| 192 | .It Dv SSL_OP_NO_DTLSv1_2 | ||
| 193 | Do not use the DTLSv1.2 protocol. | ||
| 194 | Deprecated; use | ||
| 195 | .Xr SSL_CTX_set_min_proto_version 3 | ||
| 196 | instead. | ||
| 197 | .It Dv SSL_OP_NO_QUERY_MTU | ||
| 198 | Do not query the MTU. | ||
| 199 | Only affects DTLS connections. | ||
| 200 | .It Dv SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION | ||
| 201 | When performing renegotiation as a server, always start a new session (i.e., | ||
| 202 | session resumption requests are only accepted in the initial handshake). | ||
| 203 | This option is not needed for clients. | ||
| 204 | .It Dv SSL_OP_NO_TICKET | ||
| 205 | Normally clients and servers using TLSv1.2 and earlier will, where possible, | ||
| 206 | transparently make use of | ||
| 207 | RFC 5077 tickets for stateless session resumption. | ||
| 208 | .Pp | ||
| 209 | If this option is set, this functionality is disabled and tickets will not be | ||
| 210 | used by clients or servers. | ||
| 211 | .It Dv SSL_OP_NO_TLSv1 | ||
| 212 | Do not use the TLSv1.0 protocol. | ||
| 213 | Deprecated; use | ||
| 214 | .Xr SSL_CTX_set_min_proto_version 3 | ||
| 215 | instead. | ||
| 216 | .It Dv SSL_OP_NO_TLSv1_1 | ||
| 217 | Do not use the TLSv1.1 protocol. | ||
| 218 | Deprecated; use | ||
| 219 | .Xr SSL_CTX_set_min_proto_version 3 | ||
| 220 | instead. | ||
| 221 | .It Dv SSL_OP_NO_TLSv1_2 | ||
| 222 | Do not use the TLSv1.2 protocol. | ||
| 223 | Deprecated; use | ||
| 224 | .Xr SSL_CTX_set_max_proto_version 3 | ||
| 225 | instead. | ||
| 226 | .El | ||
| 227 | .Pp | ||
| 228 | The following options used to be supported at some point in the past | ||
| 229 | and no longer have any effect: | ||
| 230 | .Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION , | ||
| 231 | .Dv SSL_OP_EPHEMERAL_RSA , | ||
| 232 | .Dv SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER , | ||
| 233 | .Dv SSL_OP_MICROSOFT_SESS_ID_BUG , | ||
| 234 | .Dv SSL_OP_NETSCAPE_CA_DN_BUG , | ||
| 235 | .Dv SSL_OP_NETSCAPE_CHALLENGE_BUG , | ||
| 236 | .Dv SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG , | ||
| 237 | .Dv SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG , | ||
| 238 | .Dv SSL_OP_NO_COMPRESSION , | ||
| 239 | .Dv SSL_OP_NO_SSLv2 , | ||
| 240 | .Dv SSL_OP_NO_SSLv3 , | ||
| 241 | .Dv SSL_OP_PKCS1_CHECK_1 , | ||
| 242 | .Dv SSL_OP_PKCS1_CHECK_2 , | ||
| 243 | .Dv SSL_OP_SAFARI_ECDHE_ECDSA_BUG , | ||
| 244 | .Dv SSL_OP_SINGLE_DH_USE , | ||
| 245 | .Dv SSL_OP_SINGLE_ECDH_USE , | ||
| 246 | .Dv SSL_OP_SSLEAY_080_CLIENT_DH_BUG , | ||
| 247 | .Dv SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG , | ||
| 248 | .Dv SSL_OP_TLS_BLOCK_PADDING_BUG , | ||
| 249 | .Dv SSL_OP_TLS_D5_BUG , | ||
| 250 | .Dv SSL_OP_TLS_ROLLBACK_BUG , | ||
| 251 | .Dv SSL_OP_TLSEXT_PADDING . | ||
| 252 | .Sh SECURE RENEGOTIATION | ||
| 253 | OpenSSL 0.9.8m and later always attempts to use secure renegotiation as | ||
| 254 | described in RFC 5746. | ||
| 255 | This counters the prefix attack described in CVE-2009-3555 and elsewhere. | ||
| 256 | .Pp | ||
| 257 | This attack has far-reaching consequences which application writers should be | ||
| 258 | aware of. | ||
| 259 | In the description below an implementation supporting secure renegotiation is | ||
| 260 | referred to as | ||
| 261 | .Dq patched . | ||
| 262 | A server not supporting secure | ||
| 263 | renegotiation is referred to as | ||
| 264 | .Dq unpatched . | ||
| 265 | .Pp | ||
| 266 | The following sections describe the operations permitted by OpenSSL's secure | ||
| 267 | renegotiation implementation. | ||
| 268 | .Ss Patched client and server | ||
| 269 | Connections and renegotiation are always permitted by OpenSSL implementations. | ||
| 270 | .Ss Unpatched client and patched OpenSSL server | ||
| 271 | The initial connection succeeds but client renegotiation is denied by the | ||
| 272 | server with a | ||
| 273 | .Em no_renegotiation | ||
| 274 | warning alert. | ||
| 275 | .Pp | ||
| 276 | If the patched OpenSSL server attempts to renegotiate, a fatal | ||
| 277 | .Em handshake_failure | ||
| 278 | alert is sent. | ||
| 279 | This is because the server code may be unaware of the unpatched nature of the | ||
| 280 | client. | ||
| 281 | .Pp | ||
| 282 | Note that a bug in OpenSSL clients earlier than 0.9.8m (all of which | ||
| 283 | are unpatched) will result in the connection hanging if it receives a | ||
| 284 | .Em no_renegotiation | ||
| 285 | alert. | ||
| 286 | OpenSSL versions 0.9.8m and later will regard a | ||
| 287 | .Em no_renegotiation | ||
| 288 | alert as fatal and respond with a fatal | ||
| 289 | .Em handshake_failure | ||
| 290 | alert. | ||
| 291 | This is because the OpenSSL API currently has no provision to indicate to an | ||
| 292 | application that a renegotiation attempt was refused. | ||
| 293 | .Ss Patched OpenSSL client and unpatched server | ||
| 294 | If the option | ||
| 295 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
| 296 | is set then initial connections and renegotiation between patched OpenSSL | ||
| 297 | clients and unpatched servers succeeds. | ||
| 298 | If neither option is set then initial connections to unpatched servers will | ||
| 299 | fail. | ||
| 300 | .Pp | ||
| 301 | The option | ||
| 302 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
| 303 | is currently set by default even though it has security implications: | ||
| 304 | otherwise it would be impossible to connect to unpatched servers (i.e., all of | ||
| 305 | them initially) and this is clearly not acceptable. | ||
| 306 | Renegotiation is permitted because this does not add any additional security | ||
| 307 | issues: during an attack clients do not see any renegotiations anyway. | ||
| 308 | .Pp | ||
| 309 | As more servers become patched, the option | ||
| 310 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
| 311 | will | ||
| 312 | .Em not | ||
| 313 | be set by default in a future version of OpenSSL. | ||
| 314 | .Pp | ||
| 315 | OpenSSL client applications wishing to ensure they can connect to unpatched | ||
| 316 | servers should always | ||
| 317 | .Em set | ||
| 318 | .Dv SSL_OP_LEGACY_SERVER_CONNECT . | ||
| 319 | .Pp | ||
| 320 | OpenSSL client applications that want to ensure they can | ||
| 321 | .Em not | ||
| 322 | connect to unpatched servers (and thus avoid any security issues) should always | ||
| 323 | .Em clear | ||
| 324 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
| 325 | using | ||
| 326 | .Fn SSL_CTX_clear_options | ||
| 327 | or | ||
| 328 | .Fn SSL_clear_options . | ||
| 329 | .Sh RETURN VALUES | ||
| 330 | .Fn SSL_CTX_set_options | ||
| 331 | and | ||
| 332 | .Fn SSL_set_options | ||
| 333 | return the new options bitmask after adding | ||
| 334 | .Fa options . | ||
| 335 | .Pp | ||
| 336 | .Fn SSL_CTX_clear_options | ||
| 337 | and | ||
| 338 | .Fn SSL_clear_options | ||
| 339 | return the new options bitmask after clearing | ||
| 340 | .Fa options . | ||
| 341 | .Pp | ||
| 342 | .Fn SSL_CTX_get_options | ||
| 343 | and | ||
| 344 | .Fn SSL_get_options | ||
| 345 | return the current bitmask. | ||
| 346 | .Pp | ||
| 347 | .Fn SSL_get_secure_renegotiation_support | ||
| 348 | returns 1 is the peer supports secure renegotiation and 0 if it does not. | ||
| 349 | .Sh SEE ALSO | ||
| 350 | .Xr openssl 1 , | ||
| 351 | .Xr ssl 3 , | ||
| 352 | .Xr SSL_clear 3 , | ||
| 353 | .Xr SSL_CTX_ctrl 3 , | ||
| 354 | .Xr SSL_CTX_set_min_proto_version 3 , | ||
| 355 | .Xr SSL_new 3 | ||
| 356 | .Sh HISTORY | ||
| 357 | .Fn SSL_CTX_set_options | ||
| 358 | and | ||
| 359 | .Fn SSL_set_options | ||
| 360 | first appeared in SSLeay 0.9.0 and have been available since | ||
| 361 | .Ox 2.4 . | ||
| 362 | .Pp | ||
| 363 | .Fn SSL_CTX_get_options | ||
| 364 | and | ||
| 365 | .Fn SSL_get_options | ||
| 366 | first appeared in OpenSSL 0.9.2b and have been available since | ||
| 367 | .Ox 2.6 . | ||
| 368 | .Pp | ||
| 369 | .Fn SSL_CTX_clear_options , | ||
| 370 | .Fn SSL_clear_options , | ||
| 371 | and | ||
| 372 | .Fn SSL_get_secure_renegotiation_support | ||
| 373 | first appeared in OpenSSL 0.9.8m and have been available since | ||
| 374 | .Ox 4.9 . | ||
