2 # Copyright 2016-2016 The OpenSSL Project Authors. All Rights Reserved.
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
10 ## SSL test configurations
16 use OpenSSL::Test::Utils;
20 name => "SNI-switch-context",
23 "ServerNameCallback" => "IgnoreMismatch",
28 "ServerName" => "server2",
32 "ExpectedServerName" => "server2",
33 "ExpectedResult" => "Success"
37 name => "SNI-keep-context",
40 "ServerNameCallback" => "IgnoreMismatch",
45 "ServerName" => "server1",
49 "ExpectedServerName" => "server1",
50 "ExpectedResult" => "Success"
54 name => "SNI-no-server-support",
58 "ServerName" => "server1",
61 test => { "ExpectedResult" => "Success" },
64 name => "SNI-no-client-support",
67 "ServerNameCallback" => "IgnoreMismatch",
72 # We expect that the callback is still called
73 # to let the application decide whether they tolerate
74 # missing SNI (as our test callback does).
75 "ExpectedServerName" => "server1",
76 "ExpectedResult" => "Success"
80 name => "SNI-bad-sni-ignore-mismatch",
83 "ServerNameCallback" => "IgnoreMismatch",
88 "ServerName" => "invalid",
92 "ExpectedServerName" => "server1",
93 "ExpectedResult" => "Success"
97 name => "SNI-bad-sni-reject-mismatch",
100 "ServerNameCallback" => "RejectMismatch",
105 "ServerName" => "invalid",
109 "ExpectedResult" => "ServerFail",
110 "ExpectedServerAlert" => "UnrecognizedName"
114 name => "SNI-bad-early-sni-ignore-mismatch",
117 "ServerNameCallback" => "EarlyIgnoreMismatch",
122 "ServerName" => "invalid",
126 "ExpectedServerName" => "server1",
127 "ExpectedResult" => "Success"
131 name => "SNI-bad-early-sni-reject-mismatch",
134 "ServerNameCallback" => "EarlyRejectMismatch",
139 "ServerName" => "invalid",
143 "ExpectedResult" => "ServerFail",
144 "ExpectedServerAlert" => "UnrecognizedName"
149 our @tests_tls_1_1 = (
151 name => "SNI-early-disable-v12",
154 "ServerNameCallback" => "EarlyNoV12",
159 "ServerName" => "server2",
163 "ExpectedProtocol" => "TLSv1.1",
164 "ExpectedServerName" => "server2",
169 push @tests, @tests_tls_1_1 unless disabled("tls1_1");