2 # Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the Apache License 2.0 (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
10 ## Test packet fragmentation
19 # Default fragment size is 512.
21 name => "one-fragment-minus-app-data",
25 ApplicationData => 511,
29 name => "one-fragment-app-data",
33 ApplicationData => 512,
37 name => "one-fragment-plus-app-data",
41 ApplicationData => 513,
45 name => "small-app-data",
49 ApplicationData => 4 * 1024 + 1,
53 name => "small-app-data-large-fragment-size",
57 ApplicationData => 4 * 1024 + 1,
58 MaxFragmentSize => 16384,
62 name => "medium-app-data",
66 ApplicationData => 32 * 1024 + 7,
69 # Exceeds the 64kB write buffer size.
71 name => "medium-plus-app-data",
75 ApplicationData => 128 * 1024 - 3,
79 name => "large-app-data",
83 ApplicationData => 1024 * 1024,
87 name => "large-app-data-large-fragment-size",
91 ApplicationData => 1024 * 1024,
92 MaxFragmentSize => 16384,
96 name => "large-app-data-odd-fragment-size",
100 ApplicationData => 1024 * 1024,
101 MaxFragmentSize => 5 * 1024 - 5,
104 # When the buffer / fragment size ratio is sufficiently large,
105 # multi-buffer code kicks in on some platforms for AES-SHA. The
106 # exact minimum ratio depends on the platform, and is usually
107 # around 4. Since the test buffer is 64kB, a 4kB fragment is
110 # (We run this test on all platforms though it's only true multibuffer
113 name => "large-app-data-aes-sha1-multibuffer",
116 CipherString => "AES128-SHA",
117 MaxProtocol => "TLSv1.2"
120 ApplicationData => 1024 * 1024,
121 MaxFragmentSize => 4 * 1024,
125 name => "large-app-data-aes-sha2-multibuffer",
128 CipherString => "AES128-SHA256",
129 MaxProtocol => "TLSv1.2"
132 ApplicationData => 1024 * 1024,
133 MaxFragmentSize => 4 * 1024,
137 name => "large-app-data-aes-sha1-multibuffer-odd-fragment",
140 CipherString => "AES128-SHA",
141 MaxProtocol => "TLSv1.2"
144 ApplicationData => 1024 * 1024 + 3,
145 MaxFragmentSize => 5 * 1024 - 5,
149 name => "large-app-data-aes-sha2-multibuffer-odd-fragment",
152 CipherString => "AES128-SHA256",
153 MaxProtocol => "TLSv1.2"
156 ApplicationData => 1024 * 1024 - 3,
157 MaxFragmentSize => 5 * 1024 + 5,
160 # Test that multibuffer-capable code also handles small data correctly.
161 # Here fragment size == app data size < buffer size,
162 # so no multibuffering should happen.
164 name => "small-app-data-aes-sha1-multibuffer",
167 CipherString => "AES128-SHA",
168 MaxProtocol => "TLSv1.2"
171 ApplicationData => 4 * 1024,
172 MaxFragmentSize => 4 * 1024,
176 name => "small-app-data-aes-sha2-multibuffer",
179 CipherString => "AES128-SHA256",
180 MaxProtocol => "TLSv1.2"
183 ApplicationData => 4 * 1024,
184 MaxFragmentSize => 4 * 1024,
187 ############################################
188 # Default (Max) Fragment Size is 512.
189 # Default Application data size is 256.
191 name => "Maximum Fragment Len extension set to 1024 w. FragmentSize disabled",
195 MaxFragmentLenExt => 1024,
199 ApplicationData => 3072,
200 MaxFragmentSize => 16384,
204 name => "Maximum Fragment Len extension equal FragmentSize to 2048",
208 MaxFragmentLenExt => 2048,
212 ApplicationData => 3072,
213 MaxFragmentSize => 2048,
217 name => "Maximum Fragment Len extension 512 lower than FragmentSize 1024",
221 MaxFragmentLenExt => 512,
225 ApplicationData => 3072,
226 MaxFragmentSize => 1024,
230 name => "Maximum Fragment Len extension 1024 lower than FragmentSize 1024",
234 MaxFragmentLenExt => 2048,
238 ApplicationData => 3072,
239 MaxFragmentSize => 1024,
243 name => "Maximum Fragment Len extension 4096 greater than FragmentSize 2048",
247 MaxFragmentLenExt => 4096,
251 ApplicationData => 8196,
252 MaxFragmentSize => 2048,
256 name => "Maximum Fragment Len extension 2048 greater than FragmentSize 1024",
260 MaxFragmentLenExt => 2048,
264 ApplicationData => 3072,
265 MaxFragmentSize => 1024,