Add DTLS renegotiation 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             extra => {
22                 "ServerNameCallback" => "IgnoreMismatch",
23             },
24         },
25         client => {
26             extra => {
27                 "ServerName" => "server2",
28             },
29         },
30         test   => {
31             "ExpectedServerName" => "server2",
32             "ExpectedResult" => "Success"
33         },
34     },
35     {
36         name => "SNI-keep-context",
37         server => {
38             extra => {
39                 "ServerNameCallback" => "IgnoreMismatch",
40             },
41         },
42         client => {
43             extra => {
44                 "ServerName" => "server1",
45             },
46         },
47         test   => {
48             "ExpectedServerName" => "server1",
49             "ExpectedResult" => "Success"
50         },
51     },
52     {
53         name => "SNI-no-server-support",
54         server => { },
55         client => {
56             extra => {
57                 "ServerName" => "server1",
58             },
59         },
60         test   => { "ExpectedResult" => "Success" },
61     },
62     {
63         name => "SNI-no-client-support",
64         server => {
65             extra => {
66                 "ServerNameCallback" => "IgnoreMismatch",
67             },
68         },
69         client => { },
70         test   => {
71             # We expect that the callback is still called
72             # to let the application decide whether they tolerate
73             # missing SNI (as our test callback does).
74             "ExpectedServerName" => "server1",
75             "ExpectedResult" => "Success"
76         },
77     },
78     {
79         name => "SNI-bad-sni-ignore-mismatch",
80         server => {
81             extra => {
82                 "ServerNameCallback" => "IgnoreMismatch",
83             },
84         },
85         client => {
86             extra => {
87                 "ServerName" => "invalid",
88             },
89         },
90         test   => {
91             "ExpectedServerName" => "server1",
92             "ExpectedResult" => "Success"
93         },
94     },
95     {
96         name => "SNI-bad-sni-reject-mismatch",
97         server => {
98             extra => {
99                 "ServerNameCallback" => "RejectMismatch",
100             },
101         },
102         client => {
103             extra => {
104                 "ServerName" => "invalid",
105             },
106         },
107         test   => {
108             "ExpectedResult" => "ServerFail",
109             "ExpectedServerAlert" => "UnrecognizedName"
110         },
111     },
112 );