ae6446ed3469492377771669121fb4459bbce020
[openssl.git] / test / ssl-tests / 13-fragmentation.conf.in
1 # -*- mode: perl; -*-
2 # Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
3 #
4 # Licensed under the OpenSSL license (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
8
9
10 ## Test version negotiation
11
12 use strict;
13 use warnings;
14
15 package ssltests;
16
17
18 our @tests = (
19     # Default fragment size is 512.
20     {
21         name => "one-fragment-minus-app-data",
22         server => { },
23         client => { },
24         test => {
25             ApplicationData => 511,
26         }
27     },
28     {
29         name => "one-fragment-app-data",
30         server => { },
31         client => { },
32         test => {
33             ApplicationData => 512,
34         }
35     },
36     {
37         name => "one-fragment-plus-app-data",
38         server => { },
39         client => { },
40         test => {
41             ApplicationData => 513,
42         }
43     },
44     {
45         name => "small-app-data",
46         server => { },
47         client => { },
48         test => {
49             ApplicationData => 4 * 1024 + 1,
50         }
51     },
52     {
53         name => "small-app-data-large-fragment-size",
54         server => { },
55         client => { },
56         test => {
57             ApplicationData => 4 * 1024 + 1,
58             MaxFragmentSize => 16384,
59         }
60     },
61     {
62         name => "medium-app-data",
63         server => { },
64         client => { },
65         test => {
66             ApplicationData => 32 * 1024 + 7,
67         }
68     },
69     # Exceeds the 64kB write buffer size.
70     {
71         name => "medium-plus-app-data",
72         server => { },
73         client => { },
74         test => {
75             ApplicationData => 128 * 1024 - 3,
76         }
77     },
78     {
79         name => "large-app-data",
80         server => { },
81         client => { },
82         test => {
83             ApplicationData => 1024 * 1024,
84         }
85     },
86     {
87         name => "large-app-data-large-fragment-size",
88         server => { },
89         client => { },
90         test => {
91             ApplicationData => 1024 * 1024,
92             MaxFragmentSize => 16384,
93         }
94     },
95     {
96         name => "large-app-data-odd-fragment-size",
97         server => { },
98         client => { },
99         test => {
100             ApplicationData => 1024 * 1024,
101             MaxFragmentSize => 5 * 1024 - 5,
102         }
103     },
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 the test buffer is 64kB, a 4kB fragment is
108     # easily sufficient.
109     #
110     # (We run this test on all platforms though it's only true multibuffer
111     #  on some of them.)
112     {
113         name => "large-app-data-aes-sha1-multibuffer",
114         server => { },
115         client => {
116             CipherString => "AES128-SHA",
117             MaxProtocol => "TLSv1.2"
118         },
119         test => {
120             ApplicationData => 1024 * 1024,
121             MaxFragmentSize => 4 * 1024,
122         }
123     },
124     {
125         name => "large-app-data-aes-sha2-multibuffer",
126         server => { },
127         client => {
128             CipherString => "AES128-SHA256",
129             MaxProtocol => "TLSv1.2"
130         },
131         test => {
132             ApplicationData => 1024 * 1024,
133             MaxFragmentSize => 4 * 1024,
134         }
135     },
136         {
137         name => "large-app-data-aes-sha1-multibuffer-odd-fragment",
138         server => { },
139         client => {
140             CipherString => "AES128-SHA",
141             MaxProtocol => "TLSv1.2"
142         },
143         test => {
144             ApplicationData => 1024 * 1024 + 3,
145             MaxFragmentSize => 5 * 1024 - 5,
146         }
147     },
148     {
149         name => "large-app-data-aes-sha2-multibuffer-odd-fragment",
150         server => { },
151         client => {
152             CipherString => "AES128-SHA256",
153             MaxProtocol => "TLSv1.2"
154         },
155         test => {
156             ApplicationData => 1024 * 1024 - 3,
157             MaxFragmentSize => 5 * 1024 + 5,
158         }
159     },
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.
163     {
164         name => "small-app-data-aes-sha1-multibuffer",
165         server => { },
166         client => {
167             CipherString => "AES128-SHA",
168             MaxProtocol => "TLSv1.2"
169         },
170         test => {
171             ApplicationData => 4 * 1024,
172             MaxFragmentSize => 4 * 1024,
173         }
174     },
175     {
176         name => "small-app-data-aes-sha2-multibuffer",
177         server => { },
178         client => {
179             CipherString => "AES128-SHA256",
180             MaxProtocol => "TLSv1.2"
181         },
182         test => {
183             ApplicationData => 4 * 1024,
184             MaxFragmentSize => 4 * 1024,
185         }
186     },
187 );