SSL test framework: port resumption tests
[openssl.git] / test / ssl-tests / 05-sni.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 ## SSL test configurations
11
12 use strict;
13 use warnings;
14
15 package ssltests;
16
17 our @tests = (
18     {
19         name => "SNI-switch-context",
20         server => { },
21         client => { },
22         test   => { "ServerName" => "server2",
23                     "ExpectedServerName" => "server2",
24                     "ServerNameCallback" => "IgnoreMismatch",
25                     "ExpectedResult" => "Success" },
26     },
27     {
28         name => "SNI-keep-context",
29         server => { },
30         client => { },
31         test   => { "ServerName" => "server1",
32                     "ExpectedServerName" => "server1",
33                     "ServerNameCallback" => "IgnoreMismatch",
34                     "ExpectedResult" => "Success" },
35     },
36     {
37         name => "SNI-no-server-support",
38         server => { },
39         client => { },
40         test   => { "ServerName" => "server1",
41                     "ExpectedResult" => "Success" },
42     },
43     {
44         name => "SNI-no-client-support",
45         server => { },
46         client => { },
47         test   => {
48             # We expect that the callback is still called
49             # to let the application decide whether they tolerate
50             # missing SNI (as our test callback does).
51             "ExpectedServerName" => "server1",
52             "ServerNameCallback" => "IgnoreMismatch",
53             "ExpectedResult" => "Success"
54         },
55     },
56     {
57         name => "SNI-bad-sni-ignore-mismatch",
58         server => { },
59         client => { },
60         test   => { "ServerName" => "invalid",
61                     "ExpectedServerName" => "server1",
62                     "ServerNameCallback" => "IgnoreMismatch",
63                     "ExpectedResult" => "Success" },
64     },
65     {
66         name => "SNI-bad-sni-reject-mismatch",
67         server => { },
68         client => { },
69         test   => { "ServerName" => "invalid",
70                     "ServerNameCallback" => "RejectMismatch",
71                     "ExpectedResult" => "ServerFail",
72                     "ServerAlert" => "UnrecognizedName"},
73     },
74 );