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",
24 "ClientALPNProtocols" => "foo",
25 "ServerALPNProtocols" => "foo",
26 "ExpectedALPNProtocol" => "foo",
30 name => "alpn-client-finds-match",
34 "ClientALPNProtocols" => "foo,bar",
35 "ServerALPNProtocols" => "baz,bar",
36 "ExpectedALPNProtocol" => "bar",
40 name => "alpn-client-honours-server-pref",
44 "ClientALPNProtocols" => "foo,bar",
45 "ServerALPNProtocols" => "bar,foo",
46 "ExpectedALPNProtocol" => "bar",
50 name => "alpn-alert-on-mismatch",
54 "ClientALPNProtocols" => "foo,bar",
55 "ServerALPNProtocols" => "baz",
56 "ExpectedResult" => "ServerFail",
57 "ServerAlert" => "NoApplicationProtocol",
61 name => "alpn-no-server-support",
65 "ClientALPNProtocols" => "foo",
66 "ExpectedALPNProtocol" => undef,
70 name => "alpn-no-client-support",
74 "ServerALPNProtocols" => "foo",
75 "ExpectedALPNProtocol" => undef,
79 name => "alpn-with-sni-no-context-switch",
84 "ClientALPNProtocols" => "foo,bar",
85 "ServerALPNProtocols" => "foo",
86 "Server2ALPNProtocols" => "bar",
87 "ServerName" => "server1",
88 "ServerNameCallback" => "IgnoreMismatch",
89 "ExpectedServerName" => "server1",
90 "ExpectedALPNProtocol" => "foo",
94 name => "alpn-with-sni-context-switch",
99 "ClientALPNProtocols" => "foo,bar",
100 "ServerALPNProtocols" => "foo",
101 "Server2ALPNProtocols" => "bar",
102 "ServerName" => "server2",
103 "ServerNameCallback" => "IgnoreMismatch",
104 "ExpectedServerName" => "server2",
105 "ExpectedALPNProtocol" => "bar",
109 name => "alpn-selected-sni-server-supports-alpn",
114 "ClientALPNProtocols" => "foo,bar",
115 "Server2ALPNProtocols" => "bar",
116 "ServerName" => "server2",
117 "ServerNameCallback" => "IgnoreMismatch",
118 "ExpectedServerName" => "server2",
119 "ExpectedALPNProtocol" => "bar",
123 name => "alpn-selected-sni-server-does-not-support-alpn",
128 "ClientALPNProtocols" => "foo,bar",
129 "ServerALPNProtocols" => "foo",
130 "ServerName" => "server2",
131 "ServerNameCallback" => "IgnoreMismatch",
132 "ExpectedServerName" => "server2",
133 "ExpectedALPNProtocol" => undef,