Upgrade to OpenSSL 0.9.8h.
[dragonfly.git] / secure / lib / libssl / man / SSL_CTX_set_options.3
... / ...
CommitLineData
1.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
2.\"
3.\" Standard preamble:
4.\" ========================================================================
5.de Sh \" Subsection heading
6.br
7.if t .Sp
8.ne 5
9.PP
10\fB\\$1\fR
11.PP
12..
13.de Sp \" Vertical space (when we can't use .PP)
14.if t .sp .5v
15.if n .sp
16..
17.de Vb \" Begin verbatim text
18.ft CW
19.nf
20.ne \\$1
21..
22.de Ve \" End verbatim text
23.ft R
24.fi
25..
26.\" Set up some character translations and predefined strings. \*(-- will
27.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
28.\" double quote, and \*(R" will give a right double quote. | will give a
29.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
30.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
31.\" expand to `' in nroff, nothing in troff, for use with C<>.
32.tr \(*W-|\(bv\*(Tr
33.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
34.ie n \{\
35. ds -- \(*W-
36. ds PI pi
37. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
38. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
39. ds L" ""
40. ds R" ""
41. ds C` ""
42. ds C' ""
43'br\}
44.el\{\
45. ds -- \|\(em\|
46. ds PI \(*p
47. ds L" ``
48. ds R" ''
49'br\}
50.\"
51.\" If the F register is turned on, we'll generate index entries on stderr for
52.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
53.\" entries marked with X<> in POD. Of course, you'll have to process the
54.\" output yourself in some meaningful fashion.
55.if \nF \{\
56. de IX
57. tm Index:\\$1\t\\n%\t"\\$2"
58..
59. nr % 0
60. rr F
61.\}
62.\"
63.\" For nroff, turn off justification. Always turn off hyphenation; it makes
64.\" way too many mistakes in technical documents.
65.hy 0
66.if n .na
67.\"
68.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
69.\" Fear. Run. Save yourself. No user-serviceable parts.
70. \" fudge factors for nroff and troff
71.if n \{\
72. ds #H 0
73. ds #V .8m
74. ds #F .3m
75. ds #[ \f1
76. ds #] \fP
77.\}
78.if t \{\
79. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
80. ds #V .6m
81. ds #F 0
82. ds #[ \&
83. ds #] \&
84.\}
85. \" simple accents for nroff and troff
86.if n \{\
87. ds ' \&
88. ds ` \&
89. ds ^ \&
90. ds , \&
91. ds ~ ~
92. ds /
93.\}
94.if t \{\
95. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
96. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
97. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
98. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
99. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
100. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
101.\}
102. \" troff and (daisy-wheel) nroff accents
103.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
104.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
105.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
106.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
107.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
108.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
109.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
110.ds ae a\h'-(\w'a'u*4/10)'e
111.ds Ae A\h'-(\w'A'u*4/10)'E
112. \" corrections for vroff
113.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
114.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
115. \" for low resolution devices (crt and lpr)
116.if \n(.H>23 .if \n(.V>19 \
117\{\
118. ds : e
119. ds 8 ss
120. ds o a
121. ds d- d\h'-1'\(ga
122. ds D- D\h'-1'\(hy
123. ds th \o'bp'
124. ds Th \o'LP'
125. ds ae ae
126. ds Ae AE
127.\}
128.rm #[ #] #H #V #F C
129.\" ========================================================================
130.\"
131.IX Title "SSL_CTX_set_options 3"
132.TH SSL_CTX_set_options 3 "2008-09-06" "0.9.8h" "OpenSSL"
133.SH "NAME"
134SSL_CTX_set_options, SSL_set_options, SSL_CTX_get_options, SSL_get_options \- manipulate SSL engine options
135.SH "SYNOPSIS"
136.IX Header "SYNOPSIS"
137.Vb 1
138\& #include <openssl/ssl.h>
139.Ve
140.PP
141.Vb 2
142\& long SSL_CTX_set_options(SSL_CTX *ctx, long options);
143\& long SSL_set_options(SSL *ssl, long options);
144.Ve
145.PP
146.Vb 2
147\& long SSL_CTX_get_options(SSL_CTX *ctx);
148\& long SSL_get_options(SSL *ssl);
149.Ve
150.SH "DESCRIPTION"
151.IX Header "DESCRIPTION"
152\&\fISSL_CTX_set_options()\fR adds the options set via bitmask in \fBoptions\fR to \fBctx\fR.
153Options already set before are not cleared!
154.PP
155\&\fISSL_set_options()\fR adds the options set via bitmask in \fBoptions\fR to \fBssl\fR.
156Options already set before are not cleared!
157.PP
158\&\fISSL_CTX_get_options()\fR returns the options set for \fBctx\fR.
159.PP
160\&\fISSL_get_options()\fR returns the options set for \fBssl\fR.
161.SH "NOTES"
162.IX Header "NOTES"
163The behaviour of the \s-1SSL\s0 library can be changed by setting several options.
164The options are coded as bitmasks and can be combined by a logical \fBor\fR
165operation (|). Options can only be added but can never be reset.
166.PP
167\&\fISSL_CTX_set_options()\fR and \fISSL_set_options()\fR affect the (external)
168protocol behaviour of the \s-1SSL\s0 library. The (internal) behaviour of
169the \s-1API\s0 can be changed by using the similar
170\&\fISSL_CTX_set_mode\fR\|(3) and \fISSL_set_mode()\fR functions.
171.PP
172During a handshake, the option settings of the \s-1SSL\s0 object are used. When
173a new \s-1SSL\s0 object is created from a context using \fISSL_new()\fR, the current
174option setting is copied. Changes to \fBctx\fR do not affect already created
175\&\s-1SSL\s0 objects. \fISSL_clear()\fR does not affect the settings.
176.PP
177The following \fBbug workaround\fR options are available:
178.IP "\s-1SSL_OP_MICROSOFT_SESS_ID_BUG\s0" 4
179.IX Item "SSL_OP_MICROSOFT_SESS_ID_BUG"
180www.microsoft.com \- when talking SSLv2, if session-id reuse is
181performed, the session-id passed back in the server-finished message
182is different from the one decided upon.
183.IP "\s-1SSL_OP_NETSCAPE_CHALLENGE_BUG\s0" 4
184.IX Item "SSL_OP_NETSCAPE_CHALLENGE_BUG"
185Netscape\-Commerce/1.12, when talking SSLv2, accepts a 32 byte
186challenge but then appears to only use 16 bytes when generating the
187encryption keys. Using 16 bytes is ok but it should be ok to use 32.
188According to the SSLv3 spec, one should use 32 bytes for the challenge
189when operating in SSLv2/v3 compatibility mode, but as mentioned above,
190this breaks this server so 16 bytes is the way to go.
191.IP "\s-1SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG\s0" 4
192.IX Item "SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG"
193ssl3.netscape.com:443, first a connection is established with \s-1RC4\-MD5\s0.
194If it is then resumed, we end up using \s-1DES\-CBC3\-SHA\s0. It should be
195\&\s-1RC4\-MD5\s0 according to 7.6.1.3, 'cipher_suite'.
196.Sp
197Netscape\-Enterprise/2.01 (https://merchant.netscape.com) has this bug.
198It only really shows up when connecting via SSLv2/v3 then reconnecting
199via SSLv3. The cipher list changes....
200.Sp
201\&\s-1NEW\s0 \s-1INFORMATION\s0. Try connecting with a cipher list of just
202\&\s-1DES\-CBC\-SHA:RC4\-MD5\s0. For some weird reason, each new connection uses
203\&\s-1RC4\-MD5\s0, but a re-connect tries to use \s-1DES\-CBC\-SHA\s0. So netscape, when
204doing a re\-connect, always takes the first cipher in the cipher list.
205.IP "\s-1SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG\s0" 4
206.IX Item "SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG"
207\&...
208.IP "\s-1SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER\s0" 4
209.IX Item "SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER"
210\&...
211.IP "\s-1SSL_OP_MSIE_SSLV2_RSA_PADDING\s0" 4
212.IX Item "SSL_OP_MSIE_SSLV2_RSA_PADDING"
213As of OpenSSL 0.9.7h and 0.9.8a, this option has no effect.
214.IP "\s-1SSL_OP_SSLEAY_080_CLIENT_DH_BUG\s0" 4
215.IX Item "SSL_OP_SSLEAY_080_CLIENT_DH_BUG"
216\&...
217.IP "\s-1SSL_OP_TLS_D5_BUG\s0" 4
218.IX Item "SSL_OP_TLS_D5_BUG"
219\&...
220.IP "\s-1SSL_OP_TLS_BLOCK_PADDING_BUG\s0" 4
221.IX Item "SSL_OP_TLS_BLOCK_PADDING_BUG"
222\&...
223.IP "\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0" 4
224.IX Item "SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS"
225Disables a countermeasure against a \s-1SSL\s0 3.0/TLS 1.0 protocol
226vulnerability affecting \s-1CBC\s0 ciphers, which cannot be handled by some
227broken \s-1SSL\s0 implementations. This option has no effect for connections
228using other ciphers.
229.IP "\s-1SSL_OP_ALL\s0" 4
230.IX Item "SSL_OP_ALL"
231All of the above bug workarounds.
232.PP
233It is usually safe to use \fB\s-1SSL_OP_ALL\s0\fR to enable the bug workaround
234options if compatibility with somewhat broken implementations is
235desired.
236.PP
237The following \fBmodifying\fR options are available:
238.IP "\s-1SSL_OP_TLS_ROLLBACK_BUG\s0" 4
239.IX Item "SSL_OP_TLS_ROLLBACK_BUG"
240Disable version rollback attack detection.
241.Sp
242During the client key exchange, the client must send the same information
243about acceptable \s-1SSL/TLS\s0 protocol levels as during the first hello. Some
244clients violate this rule by adapting to the server's answer. (Example:
245the client sends a SSLv2 hello and accepts up to SSLv3.1=TLSv1, the server
246only understands up to SSLv3. In this case the client must still use the
247same SSLv3.1=TLSv1 announcement. Some clients step down to SSLv3 with respect
248to the server's answer and violate the version rollback protection.)
249.IP "\s-1SSL_OP_SINGLE_DH_USE\s0" 4
250.IX Item "SSL_OP_SINGLE_DH_USE"
251Always create a new key when using temporary/ephemeral \s-1DH\s0 parameters
252(see \fISSL_CTX_set_tmp_dh_callback\fR\|(3)).
253This option must be used to prevent small subgroup attacks, when
254the \s-1DH\s0 parameters were not generated using \*(L"strong\*(R" primes
255(e.g. when using DSA\-parameters, see \fIdhparam\fR\|(1)).
256If \*(L"strong\*(R" primes were used, it is not strictly necessary to generate
257a new \s-1DH\s0 key during each handshake but it is also recommended.
258\&\fB\s-1SSL_OP_SINGLE_DH_USE\s0\fR should therefore be enabled whenever
259temporary/ephemeral \s-1DH\s0 parameters are used.
260.IP "\s-1SSL_OP_EPHEMERAL_RSA\s0" 4
261.IX Item "SSL_OP_EPHEMERAL_RSA"
262Always use ephemeral (temporary) \s-1RSA\s0 key when doing \s-1RSA\s0 operations
263(see \fISSL_CTX_set_tmp_rsa_callback\fR\|(3)).
264According to the specifications this is only done, when a \s-1RSA\s0 key
265can only be used for signature operations (namely under export ciphers
266with restricted \s-1RSA\s0 keylength). By setting this option, ephemeral
267\&\s-1RSA\s0 keys are always used. This option breaks compatibility with the
268\&\s-1SSL/TLS\s0 specifications and may lead to interoperability problems with
269clients and should therefore never be used. Ciphers with \s-1EDH\s0 (ephemeral
270Diffie\-Hellman) key exchange should be used instead.
271.IP "\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0" 4
272.IX Item "SSL_OP_CIPHER_SERVER_PREFERENCE"
273When choosing a cipher, use the server's preferences instead of the client
274preferences. When not set, the \s-1SSL\s0 server will always follow the clients
275preferences. When set, the SSLv3/TLSv1 server will choose following its
276own preferences. Because of the different protocol, for SSLv2 the server
277will send its list of preferences to the client and the client chooses.
278.IP "\s-1SSL_OP_PKCS1_CHECK_1\s0" 4
279.IX Item "SSL_OP_PKCS1_CHECK_1"
280\&...
281.IP "\s-1SSL_OP_PKCS1_CHECK_2\s0" 4
282.IX Item "SSL_OP_PKCS1_CHECK_2"
283\&...
284.IP "\s-1SSL_OP_NETSCAPE_CA_DN_BUG\s0" 4
285.IX Item "SSL_OP_NETSCAPE_CA_DN_BUG"
286If we accept a netscape connection, demand a client cert, have a
287non-self-signed \s-1CA\s0 which does not have its \s-1CA\s0 in netscape, and the
288browser has a cert, it will crash/hang. Works for 3.x and 4.xbeta
289.IP "\s-1SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG\s0" 4
290.IX Item "SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG"
291\&...
292.IP "SSL_OP_NO_SSLv2" 4
293.IX Item "SSL_OP_NO_SSLv2"
294Do not use the SSLv2 protocol.
295.IP "SSL_OP_NO_SSLv3" 4
296.IX Item "SSL_OP_NO_SSLv3"
297Do not use the SSLv3 protocol.
298.IP "SSL_OP_NO_TLSv1" 4
299.IX Item "SSL_OP_NO_TLSv1"
300Do not use the TLSv1 protocol.
301.IP "\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0" 4
302.IX Item "SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION"
303When performing renegotiation as a server, always start a new session
304(i.e., session resumption requests are only accepted in the initial
305handshake). This option is not needed for clients.
306.IP "\s-1SSL_OP_NO_TICKET\s0" 4
307.IX Item "SSL_OP_NO_TICKET"
308Normally clients and servers will, where possible, transparently make use
309of RFC4507bis tickets for stateless session resumption if extension support
310is explicitly set when OpenSSL is compiled.
311.Sp
312If this option is set this functionality is disabled and tickets will
313not be used by clients or servers.
314.SH "RETURN VALUES"
315.IX Header "RETURN VALUES"
316\&\fISSL_CTX_set_options()\fR and \fISSL_set_options()\fR return the new options bitmask
317after adding \fBoptions\fR.
318.PP
319\&\fISSL_CTX_get_options()\fR and \fISSL_get_options()\fR return the current bitmask.
320.SH "SEE ALSO"
321.IX Header "SEE ALSO"
322\&\fIssl\fR\|(3), \fISSL_new\fR\|(3), \fISSL_clear\fR\|(3),
323\&\fISSL_CTX_set_tmp_dh_callback\fR\|(3),
324\&\fISSL_CTX_set_tmp_rsa_callback\fR\|(3),
325\&\fIdhparam\fR\|(1)
326.SH "HISTORY"
327.IX Header "HISTORY"
328\&\fB\s-1SSL_OP_CIPHER_SERVER_PREFERENCE\s0\fR and
329\&\fB\s-1SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION\s0\fR have been added in
330OpenSSL 0.9.7.
331.PP
332\&\fB\s-1SSL_OP_TLS_ROLLBACK_BUG\s0\fR has been added in OpenSSL 0.9.6 and was automatically
333enabled with \fB\s-1SSL_OP_ALL\s0\fR. As of 0.9.7, it is no longer included in \fB\s-1SSL_OP_ALL\s0\fR
334and must be explicitly set.
335.PP
336\&\fB\s-1SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS\s0\fR has been added in OpenSSL 0.9.6e.
337Versions up to OpenSSL 0.9.6c do not include the countermeasure that
338can be disabled with this option (in OpenSSL 0.9.6d, it was always
339enabled).