]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/SSL_CTX_set_split_send_fragment.3
Regen manual pages.
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / SSL_CTX_set_split_send_fragment.3
1 .\" Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
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<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
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
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
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.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .if !\nF .nr F 0
58 .if \nF>0 \{\
59 .    de IX
60 .    tm Index:\\$1\t\\n%\t"\\$2"
61 ..
62 .    if !\nF==2 \{\
63 .        nr % 0
64 .        nr F 2
65 .    \}
66 .\}
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_SPLIT_SEND_FRAGMENT 3"
132 .TH SSL_CTX_SET_SPLIT_SEND_FRAGMENT 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.
135 .if n .ad l
136 .nh
137 .SH "NAME"
138 SSL_CTX_set_max_send_fragment, SSL_set_max_send_fragment, SSL_CTX_set_split_send_fragment, SSL_set_split_send_fragment, SSL_CTX_set_max_pipelines, SSL_set_max_pipelines, SSL_CTX_set_default_read_buffer_len, SSL_set_default_read_buffer_len, SSL_CTX_set_tlsext_max_fragment_length, SSL_set_tlsext_max_fragment_length, SSL_SESSION_get_max_fragment_length \- Control fragment size settings and pipelining operations
139 .SH "SYNOPSIS"
140 .IX Header "SYNOPSIS"
141 .Vb 1
142 \& #include <openssl/ssl.h>
143 \&
144 \& long SSL_CTX_set_max_send_fragment(SSL_CTX *ctx, long);
145 \& long SSL_set_max_send_fragment(SSL *ssl, long m);
146 \&
147 \& long SSL_CTX_set_max_pipelines(SSL_CTX *ctx, long m);
148 \& long SSL_set_max_pipelines(SSL_CTX *ssl, long m);
149 \&
150 \& long SSL_CTX_set_split_send_fragment(SSL_CTX *ctx, long m);
151 \& long SSL_set_split_send_fragment(SSL *ssl, long m);
152 \&
153 \& void SSL_CTX_set_default_read_buffer_len(SSL_CTX *ctx, size_t len);
154 \& void SSL_set_default_read_buffer_len(SSL *s, size_t len);
155 \&
156 \& int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
157 \& int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
158 \& uint8_t SSL_SESSION_get_max_fragment_length(SSL_SESSION *session);
159 .Ve
160 .SH "DESCRIPTION"
161 .IX Header "DESCRIPTION"
162 Some engines are able to process multiple simultaneous crypto operations. This
163 capability could be utilised to parallelise the processing of a single
164 connection. For example a single write can be split into multiple records and
165 each one encrypted independently and in parallel. Note: this will only work in
166 \&\s-1TLS1.1+.\s0 There is no support in SSLv3, TLSv1.0 or \s-1DTLS\s0 (any version). This
167 capability is known as \*(L"pipelining\*(R" within OpenSSL.
168 .PP
169 In order to benefit from the pipelining capability. You need to have an engine
170 that provides ciphers that support this. The OpenSSL \*(L"dasync\*(R" engine provides
171 \&\s-1AES128\-SHA\s0 based ciphers that have this capability. However these are for
172 development and test purposes only.
173 .PP
174 \&\fISSL_CTX_set_max_send_fragment()\fR and \fISSL_set_max_send_fragment()\fR set the
175 \&\fBmax_send_fragment\fR parameter for \s-1SSL_CTX\s0 and \s-1SSL\s0 objects respectively. This
176 value restricts the amount of plaintext bytes that will be sent in any one
177 \&\s-1SSL/TLS\s0 record. By default its value is \s-1SSL3_RT_MAX_PLAIN_LENGTH\s0 (16384). These
178 functions will only accept a value in the range 512 \- \s-1SSL3_RT_MAX_PLAIN_LENGTH.\s0
179 .PP
180 \&\fISSL_CTX_set_max_pipelines()\fR and \fISSL_set_max_pipelines()\fR set the maximum number
181 of pipelines that will be used at any one time. This value applies to both
182 \&\*(L"read\*(R" pipelining and \*(L"write\*(R" pipelining. By default only one pipeline will be
183 used (i.e. normal non-parallel operation). The number of pipelines set must be
184 in the range 1 \- \s-1SSL_MAX_PIPELINES\s0 (32). Setting this to a value > 1 will also
185 automatically turn on \*(L"read_ahead\*(R" (see \fISSL_CTX_set_read_ahead\fR\|(3)). This is
186 explained further below. OpenSSL will only every use more than one pipeline if
187 a cipher suite is negotiated that uses a pipeline capable cipher provided by an
188 engine.
189 .PP
190 Pipelining operates slightly differently for reading encrypted data compared to
191 writing encrypted data. \fISSL_CTX_set_split_send_fragment()\fR and
192 \&\fISSL_set_split_send_fragment()\fR define how data is split up into pipelines when
193 writing encrypted data. The number of pipelines used will be determined by the
194 amount of data provided to the \fISSL_write_ex()\fR or \fISSL_write()\fR call divided by
195 \&\fBsplit_send_fragment\fR.
196 .PP
197 For example if \fBsplit_send_fragment\fR is set to 2000 and \fBmax_pipelines\fR is 4
198 then:
199 .PP
200 SSL_write/SSL_write_ex called with 0\-2000 bytes == 1 pipeline used
201 .PP
202 SSL_write/SSL_write_ex called with 2001\-4000 bytes == 2 pipelines used
203 .PP
204 SSL_write/SSL_write_ex called with 4001\-6000 bytes == 3 pipelines used
205 .PP
206 SSL_write/SSL_write_ex called with 6001+ bytes == 4 pipelines used
207 .PP
208 \&\fBsplit_send_fragment\fR must always be less than or equal to
209 \&\fBmax_send_fragment\fR. By default it is set to be equal to \fBmax_send_fragment\fR.
210 This will mean that the same number of records will always be created as would
211 have been created in the non-parallel case, although the data will be
212 apportioned differently. In the parallel case data will be spread equally
213 between the pipelines.
214 .PP
215 Read pipelining is controlled in a slightly different way than with write
216 pipelining. While reading we are constrained by the number of records that the
217 peer (and the network) can provide to us in one go. The more records we can get
218 in one go the more opportunity we have to parallelise the processing. As noted
219 above when setting \fBmax_pipelines\fR to a value greater than one, \fBread_ahead\fR
220 is automatically set. The \fBread_ahead\fR parameter causes OpenSSL to attempt to
221 read as much data into the read buffer as the network can provide and will fit
222 into the buffer. Without this set data is read into the read buffer one record
223 at a time. The more data that can be read, the more opportunity there is for
224 parallelising the processing at the cost of increased memory overhead per
225 connection. Setting \fBread_ahead\fR can impact the behaviour of the \fISSL_pending()\fR
226 function (see \fISSL_pending\fR\|(3)).
227 .PP
228 The \fISSL_CTX_set_default_read_buffer_len()\fR and \fISSL_set_default_read_buffer_len()\fR
229 functions control the size of the read buffer that will be used. The \fBlen\fR
230 parameter sets the size of the buffer. The value will only be used if it is
231 greater than the default that would have been used anyway. The normal default
232 value depends on a number of factors but it will be at least
233 \&\s-1SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_ENCRYPTED_OVERHEAD\s0 (16704) bytes.
234 .PP
235 \&\fISSL_CTX_set_tlsext_max_fragment_length()\fR sets the default maximum fragment
236 length negotiation mode via value \fBmode\fR to \fBctx\fR.
237 This setting affects only \s-1SSL\s0 instances created after this function is called.
238 It affects the client-side as only its side may initiate this extension use.
239 .PP
240 \&\fISSL_set_tlsext_max_fragment_length()\fR sets the maximum fragment length
241 negotiation mode via value \fBmode\fR to \fBssl\fR.
242 This setting will be used during a handshake when extensions are exchanged
243 between client and server.
244 So it only affects \s-1SSL\s0 sessions created after this function is called.
245 It affects the client-side as only its side may initiate this extension use.
246 .PP
247 \&\fISSL_SESSION_get_max_fragment_length()\fR gets the maximum fragment length
248 negotiated in \fBsession\fR.
249 .SH "RETURN VALUES"
250 .IX Header "RETURN VALUES"
251 All non-void functions return 1 on success and 0 on failure.
252 .SH "NOTES"
253 .IX Header "NOTES"
254 The Maximum Fragment Length extension support is optional on the server side.
255 If the server does not support this extension then
256 \&\fISSL_SESSION_get_max_fragment_length()\fR will return:
257 TLSEXT_max_fragment_length_DISABLED.
258 .PP
259 The following modes are available:
260 .IP "TLSEXT_max_fragment_length_DISABLED" 4
261 .IX Item "TLSEXT_max_fragment_length_DISABLED"
262 Disables Maximum Fragment Length Negotiation (default).
263 .IP "TLSEXT_max_fragment_length_512" 4
264 .IX Item "TLSEXT_max_fragment_length_512"
265 Sets Maximum Fragment Length to 512 bytes.
266 .IP "TLSEXT_max_fragment_length_1024" 4
267 .IX Item "TLSEXT_max_fragment_length_1024"
268 Sets Maximum Fragment Length to 1024.
269 .IP "TLSEXT_max_fragment_length_2048" 4
270 .IX Item "TLSEXT_max_fragment_length_2048"
271 Sets Maximum Fragment Length to 2048.
272 .IP "TLSEXT_max_fragment_length_4096" 4
273 .IX Item "TLSEXT_max_fragment_length_4096"
274 Sets Maximum Fragment Length to 4096.
275 .PP
276 With the exception of \fISSL_CTX_set_default_read_buffer_len()\fR
277 \&\fISSL_set_default_read_buffer_len()\fR, \fISSL_CTX_set_tlsext_max_fragment_length()\fR,
278 \&\fISSL_set_tlsext_max_fragment_length()\fR and \fISSL_SESSION_get_max_fragment_length()\fR
279 all these functions are implemented using macros.
280 .SH "HISTORY"
281 .IX Header "HISTORY"
282 The \fISSL_CTX_set_max_pipelines()\fR, \fISSL_set_max_pipelines()\fR,
283 \&\fISSL_CTX_set_split_send_fragment()\fR, \fISSL_set_split_send_fragment()\fR,
284 \&\fISSL_CTX_set_default_read_buffer_len()\fR and  \fISSL_set_default_read_buffer_len()\fR
285 functions were added in OpenSSL 1.1.0.
286 .PP
287 \&\fISSL_CTX_set_tlsext_max_fragment_length()\fR, \fISSL_set_tlsext_max_fragment_length()\fR
288 and \fISSL_SESSION_get_max_fragment_length()\fR were added in OpenSSL 1.1.1.
289 .SH "SEE ALSO"
290 .IX Header "SEE ALSO"
291 \&\fISSL_CTX_set_read_ahead\fR\|(3), \fISSL_pending\fR\|(3)
292 .SH "COPYRIGHT"
293 .IX Header "COPYRIGHT"
294 Copyright 2016\-2017 The OpenSSL Project Authors. All Rights Reserved.
295 .PP
296 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
297 this file except in compliance with the License.  You can obtain a copy
298 in the file \s-1LICENSE\s0 in the source distribution or at
299 <https://www.openssl.org/source/license.html>.