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
20 name => "alpn-simple",
23 "ALPNProtocols" => "foo",
28 "ALPNProtocols" => "foo",
32 "ExpectedALPNProtocol" => "foo",
36 name => "alpn-server-finds-match",
39 "ALPNProtocols" => "baz,bar",
44 "ALPNProtocols" => "foo,bar",
48 "ExpectedALPNProtocol" => "bar",
52 name => "alpn-server-honours-server-pref",
55 "ALPNProtocols" => "bar,foo",
60 "ALPNProtocols" => "foo,bar",
64 "ExpectedALPNProtocol" => "bar",
68 name => "alpn-alert-on-mismatch",
71 "ALPNProtocols" => "baz",
76 "ALPNProtocols" => "foo,bar",
80 "ExpectedResult" => "ServerFail",
81 "ExpectedServerAlert" => "NoApplicationProtocol",
85 name => "alpn-no-server-support",
89 "ALPNProtocols" => "foo",
93 "ExpectedALPNProtocol" => undef,
97 name => "alpn-no-client-support",
100 "ALPNProtocols" => "foo",
105 "ExpectedALPNProtocol" => undef,
109 name => "alpn-with-sni-no-context-switch",
112 "ALPNProtocols" => "foo",
113 "ServerNameCallback" => "IgnoreMismatch",
118 "ALPNProtocols" => "bar",
123 "ALPNProtocols" => "foo,bar",
124 "ServerName" => "server1",
128 "ExpectedServerName" => "server1",
129 "ExpectedALPNProtocol" => "foo",
133 name => "alpn-with-sni-context-switch",
136 "ALPNProtocols" => "foo",
137 "ServerNameCallback" => "IgnoreMismatch",
142 "ALPNProtocols" => "bar",
147 "ALPNProtocols" => "foo,bar",
148 "ServerName" => "server2",
152 "ExpectedServerName" => "server2",
153 "ExpectedALPNProtocol" => "bar",
157 name => "alpn-selected-sni-server-supports-alpn",
160 "ServerNameCallback" => "IgnoreMismatch",
165 "ALPNProtocols" => "bar",
170 "ALPNProtocols" => "foo,bar",
171 "ServerName" => "server2",
175 "ExpectedServerName" => "server2",
176 "ExpectedALPNProtocol" => "bar",
180 name => "alpn-selected-sni-server-does-not-support-alpn",
183 "ALPNProtocols" => "bar",
184 "ServerNameCallback" => "IgnoreMismatch",
190 "ALPNProtocols" => "foo,bar",
191 "ServerName" => "server2",
195 "ExpectedServerName" => "server2",
196 "ExpectedALPNProtocol" => undef,