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 ## Test version negotiation
23 "NPNProtocols" => "foo",
28 "NPNProtocols" => "foo",
32 "ExpectedNPNProtocol" => "foo",
36 name => "npn-client-finds-match",
39 "NPNProtocols" => "baz,bar",
44 "NPNProtocols" => "foo,bar",
48 "ExpectedNPNProtocol" => "bar",
52 name => "npn-client-honours-server-pref",
55 "NPNProtocols" => "bar,foo",
60 "NPNProtocols" => "foo,bar",
64 "ExpectedNPNProtocol" => "bar",
68 name => "npn-client-first-pref-on-mismatch",
71 "NPNProtocols" => "baz",
76 "NPNProtocols" => "foo,bar",
80 "ExpectedNPNProtocol" => "foo",
84 name => "npn-no-server-support",
88 "NPNProtocols" => "foo",
92 "ExpectedNPNProtocol" => undef,
96 name => "npn-no-client-support",
99 "NPNProtocols" => "foo",
104 "ExpectedNPNProtocol" => undef,
108 name => "npn-with-sni-no-context-switch",
111 "NPNProtocols" => "foo",
112 "ServerNameCallback" => "IgnoreMismatch",
117 "NPNProtocols" => "bar",
122 "NPNProtocols" => "foo,bar",
123 "ServerName" => "server1",
127 "ExpectedServerName" => "server1",
128 "ExpectedNPNProtocol" => "foo",
132 name => "npn-with-sni-context-switch",
135 "NPNProtocols" => "foo",
136 "ServerNameCallback" => "IgnoreMismatch",
141 "NPNProtocols" => "bar",
146 "NPNProtocols" => "foo,bar",
147 "ServerName" => "server2",
151 "ExpectedServerName" => "server2",
152 "ExpectedNPNProtocol" => "bar",
156 name => "npn-selected-sni-server-supports-npn",
159 "ServerNameCallback" => "IgnoreMismatch",
164 "NPNProtocols" => "bar",
169 "NPNProtocols" => "foo,bar",
170 "ServerName" => "server2",
174 "ExpectedServerName" => "server2",
175 "ExpectedNPNProtocol" => "bar",
179 name => "npn-selected-sni-server-does-not-support-npn",
182 "NPNProtocols" => "bar",
183 "ServerNameCallback" => "IgnoreMismatch",
189 "NPNProtocols" => "foo,bar",
190 "ServerName" => "server2",
194 "ExpectedServerName" => "server2",
195 "ExpectedNPNProtocol" => undef,
199 name => "alpn-preferred-over-npn",
202 "ALPNProtocols" => "foo",
203 "NPNProtocols" => "bar",
208 "ALPNProtocols" => "foo",
209 "NPNProtocols" => "bar",
213 "ExpectedALPNProtocol" => "foo",
214 "ExpectedNPNProtocol" => undef,
218 name => "sni-npn-preferred-over-alpn",
221 "ServerNameCallback" => "IgnoreMismatch",
222 "ALPNProtocols" => "foo",
227 "NPNProtocols" => "bar",
232 "ServerName" => "server2",
233 "ALPNProtocols" => "foo",
234 "NPNProtocols" => "bar",
238 "ExpectedALPNProtocol" => undef,
239 "ExpectedNPNProtocol" => "bar",
240 "ExpectedServerName" => "server2",