1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
9 .de Vb \" Begin verbatim text
14 .de Ve \" End verbatim text
18 .\" Set up some character translations and predefined strings. \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD. Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
54 .\" Avoid warning from groff about undefined register 'F'.
60 . tm Index:\\$1\t\\n%\t"\\$2"
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
79 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
85 . \" simple accents for nroff and troff
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'
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 \
129 .\" ========================================================================
131 .IX Title "SSL_CTX_SET_MODE 3"
132 .TH SSL_CTX_SET_MODE 3 "2018-09-11" "1.1.1" "OpenSSL"
133 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
134 .\" way too many mistakes in technical documents.
138 SSL_CTX_set_mode, SSL_CTX_clear_mode, SSL_set_mode, SSL_clear_mode, SSL_CTX_get_mode, SSL_get_mode \- manipulate SSL engine mode
140 .IX Header "SYNOPSIS"
142 \& #include <openssl/ssl.h>
144 \& long SSL_CTX_set_mode(SSL_CTX *ctx, long mode);
145 \& long SSL_CTX_clear_mode(SSL_CTX *ctx, long mode);
146 \& long SSL_set_mode(SSL *ssl, long mode);
147 \& long SSL_clear_mode(SSL *ssl, long mode);
149 \& long SSL_CTX_get_mode(SSL_CTX *ctx);
150 \& long SSL_get_mode(SSL *ssl);
153 .IX Header "DESCRIPTION"
154 \&\fISSL_CTX_set_mode()\fR adds the mode set via bitmask in \fBmode\fR to \fBctx\fR.
155 Options already set before are not cleared.
156 \&\fISSL_CTX_clear_mode()\fR removes the mode set via bitmask in \fBmode\fR from \fBctx\fR.
158 \&\fISSL_set_mode()\fR adds the mode set via bitmask in \fBmode\fR to \fBssl\fR.
159 Options already set before are not cleared.
160 \&\fISSL_clear_mode()\fR removes the mode set via bitmask in \fBmode\fR from \fBssl\fR.
162 \&\fISSL_CTX_get_mode()\fR returns the mode set for \fBctx\fR.
164 \&\fISSL_get_mode()\fR returns the mode set for \fBssl\fR.
167 The following mode changes are available:
168 .IP "\s-1SSL_MODE_ENABLE_PARTIAL_WRITE\s0" 4
169 .IX Item "SSL_MODE_ENABLE_PARTIAL_WRITE"
170 Allow SSL_write_ex(..., n, &r) to return with 0 < r < n (i.e. report success
171 when just a single record has been written). This works in a similar way for
172 \&\fISSL_write()\fR. When not set (the default), \fISSL_write_ex()\fR or \fISSL_write()\fR will only
173 report success once the complete chunk was written. Once \fISSL_write_ex()\fR or
174 \&\fISSL_write()\fR returns successful, \fBr\fR bytes have been written and the next call
175 to \fISSL_write_ex()\fR or \fISSL_write()\fR must only send the n\-r bytes left, imitating
176 the behaviour of \fIwrite()\fR.
177 .IP "\s-1SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER\s0" 4
178 .IX Item "SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER"
179 Make it possible to retry \fISSL_write_ex()\fR or \fISSL_write()\fR with changed buffer
180 location (the buffer contents must stay the same). This is not the default to
181 avoid the misconception that non-blocking \fISSL_write()\fR behaves like
182 non-blocking \fIwrite()\fR.
183 .IP "\s-1SSL_MODE_AUTO_RETRY\s0" 4
184 .IX Item "SSL_MODE_AUTO_RETRY"
185 During normal operations, non-application data records might need to be sent or
186 received that the application is not aware of.
187 If a non-application data record was processed,
188 \&\fISSL_read_ex\fR\|(3) and \fISSL_read\fR\|(3) can return with a failure and indicate the
189 need to retry with \fB\s-1SSL_ERROR_WANT_READ\s0\fR.
190 If such a non-application data record was processed, the flag
191 \&\fB\s-1SSL_MODE_AUTO_RETRY\s0\fR causes it to try to process the next record instead of
194 In a non-blocking environment applications must be prepared to handle
195 incomplete read/write operations.
196 Setting \fB\s-1SSL_MODE_AUTO_RETRY\s0\fR for a non-blocking \fB\s-1BIO\s0\fR will process
197 non-application data records until either no more data is available or
198 an application data record has been processed.
200 In a blocking environment, applications are not always prepared to
201 deal with the functions returning intermediate reports such as retry
202 requests, and setting the \fB\s-1SSL_MODE_AUTO_RETRY\s0\fR flag will cause the functions
203 to only return after successfully processing an application data record or a
206 Turning off \fB\s-1SSL_MODE_AUTO_RETRY\s0\fR can be useful with blocking \fB\s-1BIO\s0\fRs in case
207 they are used in combination with something like \fIselect()\fR or \fIpoll()\fR.
208 Otherwise the call to \fISSL_read()\fR or \fISSL_read_ex()\fR might hang when a
209 non-application record was sent and no application data was sent.
210 .IP "\s-1SSL_MODE_RELEASE_BUFFERS\s0" 4
211 .IX Item "SSL_MODE_RELEASE_BUFFERS"
212 When we no longer need a read buffer or a write buffer for a given \s-1SSL,\s0
213 then release the memory we were using to hold it.
215 save around 34k per idle \s-1SSL\s0 connection.
216 This flag has no effect on \s-1SSL\s0 v2 connections, or on \s-1DTLS\s0 connections.
217 .IP "\s-1SSL_MODE_SEND_FALLBACK_SCSV\s0" 4
218 .IX Item "SSL_MODE_SEND_FALLBACK_SCSV"
219 Send \s-1TLS_FALLBACK_SCSV\s0 in the ClientHello.
220 To be set only by applications that reconnect with a downgraded protocol
221 version; see draft\-ietf\-tls\-downgrade\-scsv\-00 for details.
223 \&\s-1DO NOT ENABLE THIS\s0 if your application attempts a normal handshake.
224 Only use this in explicit fallback retries, following the guidance
225 in draft\-ietf\-tls\-downgrade\-scsv\-00.
226 .IP "\s-1SSL_MODE_ASYNC\s0" 4
227 .IX Item "SSL_MODE_ASYNC"
228 Enable asynchronous processing. \s-1TLS I/O\s0 operations may indicate a retry with
229 \&\s-1SSL_ERROR_WANT_ASYNC\s0 with this mode set if an asynchronous capable engine is
230 used to perform cryptographic operations. See \fISSL_get_error\fR\|(3).
232 All modes are off by default except for \s-1SSL_MODE_AUTO_RETRY\s0 which is on by
235 .IX Header "RETURN VALUES"
236 \&\fISSL_CTX_set_mode()\fR and \fISSL_set_mode()\fR return the new mode bitmask
237 after adding \fBmode\fR.
239 \&\fISSL_CTX_get_mode()\fR and \fISSL_get_mode()\fR return the current bitmask.
241 .IX Header "SEE ALSO"
242 \&\fIssl\fR\|(7), \fISSL_read_ex\fR\|(3), \fISSL_read\fR\|(3), \fISSL_write_ex\fR\|(3) or
243 \&\fISSL_write\fR\|(3), \fISSL_get_error\fR\|(3)
246 \&\s-1SSL_MODE_ASYNC\s0 was first added to OpenSSL 1.1.0.
248 .IX Header "COPYRIGHT"
249 Copyright 2001\-2018 The OpenSSL Project Authors. All Rights Reserved.
251 Licensed under the OpenSSL license (the \*(L"License\*(R"). You may not use
252 this file except in compliance with the License. You can obtain a copy
253 in the file \s-1LICENSE\s0 in the source distribution or at
254 <https://www.openssl.org/source/license.html>.