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
24 "ClientNPNProtocols" => "foo",
25 "ServerNPNProtocols" => "foo",
26 "ExpectedNPNProtocol" => "foo",
30 name => "npn-client-finds-match",
34 "ClientNPNProtocols" => "foo,bar",
35 "ServerNPNProtocols" => "baz,bar",
36 "ExpectedNPNProtocol" => "bar",
40 name => "npn-client-honours-server-pref",
44 "ClientNPNProtocols" => "foo,bar",
45 "ServerNPNProtocols" => "bar,foo",
46 "ExpectedNPNProtocol" => "bar",
50 name => "npn-client-first-pref-on-mismatch",
54 "ClientNPNProtocols" => "foo,bar",
55 "ServerNPNProtocols" => "baz",
56 "ExpectedNPNProtocol" => "foo",
60 name => "npn-no-server-support",
64 "ClientNPNProtocols" => "foo",
65 "ExpectedNPNProtocol" => undef,
69 name => "npn-no-client-support",
73 "ServerNPNProtocols" => "foo",
74 "ExpectedNPNProtocol" => undef,
78 name => "npn-with-sni-no-context-switch",
83 "ClientNPNProtocols" => "foo,bar",
84 "ServerNPNProtocols" => "foo",
85 "Server2NPNProtocols" => "bar",
86 "ServerName" => "server1",
87 "ServerNameCallback" => "IgnoreMismatch",
88 "ExpectedServerName" => "server1",
89 "ExpectedNPNProtocol" => "foo",
93 name => "npn-with-sni-context-switch",
98 "ClientNPNProtocols" => "foo,bar",
99 "ServerNPNProtocols" => "foo",
100 "Server2NPNProtocols" => "bar",
101 "ServerName" => "server2",
102 "ServerNameCallback" => "IgnoreMismatch",
103 "ExpectedServerName" => "server2",
104 "ExpectedNPNProtocol" => "bar",
108 name => "npn-selected-sni-server-supports-npn",
113 "ClientNPNProtocols" => "foo,bar",
114 "Server2NPNProtocols" => "bar",
115 "ServerName" => "server2",
116 "ServerNameCallback" => "IgnoreMismatch",
117 "ExpectedServerName" => "server2",
118 "ExpectedNPNProtocol" => "bar",
122 name => "npn-selected-sni-server-does-not-support-npn",
127 "ClientNPNProtocols" => "foo,bar",
128 "ServerNPNProtocols" => "foo",
129 "ServerName" => "server2",
130 "ServerNameCallback" => "IgnoreMismatch",
131 "ExpectedServerName" => "server2",
132 "ExpectedNPNProtocol" => undef,
136 name => "alpn-preferred-over-npn",
140 "ClientALPNProtocols" => "foo",
141 "ClientNPNProtocols" => "bar",
142 "ServerALPNProtocols" => "foo",
143 "ServerNPNProtocols" => "bar",
144 "ExpectedALPNProtocol" => "foo",
145 "ExpectedNPNProtocol" => undef,
149 name => "sni-npn-preferred-over-alpn",
154 "ClientALPNProtocols" => "foo",
155 "ClientNPNProtocols" => "bar",
156 "ServerALPNProtocols" => "foo",
157 "Server2NPNProtocols" => "bar",
158 "ServerName" => "server2",
159 "ServerNameCallback" => "IgnoreMismatch",
160 "ExpectedServerName" => "server2",
161 "ExpectedALPNProtocol" => undef,
162 "ExpectedNPNProtocol" => "bar",