Standard preamble:
========================================================================
\\$1
.. ..
.... Set up some character translations and predefined strings. \*(-- will
give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
double quote, and \*(R" will give a right double quote. | will give a
real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' 'br\}
If the F register is turned on, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
. de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\}
For nroff, turn off justification. Always turn off hyphenation; it makes
way too many mistakes in technical documents.
Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
Fear. Run. Save yourself. No user-serviceable parts.
. \" fudge factors for nroff and troff . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] .\} . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents . \" corrections for vroff . \" for low resolution devices (crt and lpr) \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} ========================================================================
Title "SSL_CTX_set_options 3"
.Vb 2 long SSL_CTX_set_options(SSL_CTX *ctx, long options); long SSL_set_options(SSL *ssl, long options); .Ve
.Vb 2 long SSL_CTX_clear_options(SSL_CTX *ctx, long options); long SSL_clear_options(SSL *ssl, long options); .Ve
.Vb 2 long SSL_CTX_get_options(SSL_CTX *ctx); long SSL_get_options(SSL *ssl); .Ve
.Vb 1 long SSL_get_secure_renegotiation_support(SSL *ssl); .Ve
\fISSL_CTX_set_options() adds the options set via bitmask in options to ctx. Options already set before are not cleared!
\fISSL_set_options() adds the options set via bitmask in options to ssl. Options already set before are not cleared!
\fISSL_CTX_clear_options() clears the options set via bitmask in options to ctx.
\fISSL_clear_options() clears the options set via bitmask in options to ssl.
\fISSL_CTX_get_options() returns the options set for ctx.
\fISSL_get_options() returns the options set for ssl.
\fISSL_get_secure_renegotiation_support() indicates whether the peer supports secure renegotiation.
\fISSL_CTX_set_options() and SSL_set_options() affect the (external) protocol behaviour of the \s-1SSL\s0 library. The (internal) behaviour of the \s-1API\s0 can be changed by using the similar \fISSL_CTX_set_mode\|(3) and SSL_set_mode() functions.
During a handshake, the option settings of the \s-1SSL\s0 object are used. When a new \s-1SSL\s0 object is created from a context using SSL_new(), the current option setting is copied. Changes to ctx do not affect already created \s-1SSL\s0 objects. SSL_clear() does not affect the settings.
The following bug workaround options are available:
It is usually safe to use \s-1SSL_OP_ALL\s0 to enable the bug workaround options if compatibility with somewhat broken implementations is desired.
The following modifying options are available:
The deprecated and highly broken SSLv2 protocol does not support renegotiation at all: its use is strongly discouraged.
This attack has far reaching consequences which application writers should be aware of. In the description below an implementation supporting secure renegotiation is referred to as patched. A server not supporting secure renegotiation is referred to as unpatched.
The following sections describe the operations permitted by OpenSSL's secure renegotiation implementation. .Sh "Patched client and server" Subsection "Patched client and server" Connections and renegotiation are always permitted by OpenSSL implementations. .Sh "Unpatched client and patched OpenSSL server" Subsection "Unpatched client and patched OpenSSL server" The initial connection suceeds but client renegotiation is denied by the server with a no_renegotiation warning alert if \s-1TLS\s0 v1.0 is used or a fatal \fBhandshake_failure alert in \s-1SSL\s0 v3.0.
If the patched OpenSSL server attempts to renegotiate a fatal \fBhandshake_failure alert is sent. This is because the server code may be unaware of the unpatched nature of the client.
If the option \s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0 is set then renegotiation always succeeds.
\fB\s-1NB:\s0 a bug in OpenSSL clients earlier than 0.9.8m (all of which are unpatched) will result in the connection hanging if it receives a \fBno_renegotiation alert. OpenSSL versions 0.9.8m and later will regard a no_renegotiation alert as fatal and respond with a fatal \fBhandshake_failure alert. This is because the OpenSSL \s-1API\s0 currently has no provision to indicate to an application that a renegotiation attempt was refused. .Sh "Patched OpenSSL client and unpatched server." Subsection "Patched OpenSSL client and unpatched server." If the option \s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 or \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0 is set then initial connections and renegotiation between patched OpenSSL clients and unpatched servers succeeds. If neither option is set then initial connections to unpatched servers will fail.
The option \s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 is currently set by default even though it has security implications: otherwise it would be impossible to connect to unpatched servers (i.e. all of them initially) and this is clearly not acceptable. Renegotiation is permitted because this does not add any additional security issues: during an attack clients do not see any renegotiations anyway.
As more servers become patched the option \s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 will \fBnot be set by default in a future version of OpenSSL.
OpenSSL client applications wishing to ensure they can connect to unpatched servers should always set \s-1SSL_OP_LEGACY_SERVER_CONNECT\s0
OpenSSL client applications that want to ensure they can not connect to unpatched servers (and thus avoid any security issues) should always clear \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 using SSL_CTX_clear_options() or \fISSL_clear_options().
The difference between the \s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 and \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0 options is that \fB\s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 enables initial connections and secure renegotiation between OpenSSL clients and unpatched servers only, while \fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0 allows initial connections and renegotiation between OpenSSL and unpatched clients or servers.
\fISSL_CTX_clear_options() and SSL_clear_options() return the new options bitmask after clearing options.
\fISSL_CTX_get_options() and SSL_get_options() return the current bitmask.
\fISSL_get_secure_renegotiation_support() returns 1 is the peer supports secure renegotiation and 0 if it does not.
\fB\s-1SSL_OP_TLS_ROLLBACK_BUG\s0 has been added in OpenSSL 0.9.6 and was automatically enabled with \s-1SSL_OP_ALL\s0. As of 0.9.7, it is no longer included in \s-1SSL_OP_ALL\s0 and must be explicitly set.
\fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0 has been added in OpenSSL 0.9.6e. Versions up to OpenSSL 0.9.6c do not include the countermeasure that can be disabled with this option (in OpenSSL 0.9.6d, it was always enabled).
\fISSL_CTX_clear_options() and SSL_clear_options() were first added in OpenSSL 0.9.8m.
\fB\s-1SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION\s0, \s-1SSL_OP_LEGACY_SERVER_CONNECT\s0 and the function SSL_get_secure_renegotiation_support() were first added in OpenSSL 0.9.8m.