X-Git-Url: https://git.openssl.org/?p=openssl.git;a=blobdiff_plain;f=test%2Fssl-tests%2F09-alpn.conf.in;h=6e86375af135891e5a3c0a76c8ede9f0e3708684;hp=2a7b1f97c2ce4d7a0c790864293ab77f844f8ec7;hb=eefc485bda4ab1ac7293b4c749c251b662d9fba8;hpb=ce2cdac2787da32bcde210c7d6acdcbe41b1cd40;ds=sidebyside diff --git a/test/ssl-tests/09-alpn.conf.in b/test/ssl-tests/09-alpn.conf.in index 2a7b1f97c2..6e86375af1 100644 --- a/test/ssl-tests/09-alpn.conf.in +++ b/test/ssl-tests/09-alpn.conf.in @@ -18,119 +18,308 @@ package ssltests; our @tests = ( { name => "alpn-simple", - server => { }, - client => { }, + server => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo", + }, + }, test => { - "ClientALPNProtocols" => "foo", - "ServerALPNProtocols" => "foo", - "ExpectedALPNProtocol" => "foo", + "ExpectedALPNProtocol" => "foo", }, }, { - name => "alpn-client-finds-match", - server => { }, - client => { }, + name => "alpn-server-finds-match", + server => { + extra => { + "ALPNProtocols" => "baz,bar", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + }, + }, test => { - "ClientALPNProtocols" => "foo,bar", - "ServerALPNProtocols" => "baz,bar", - "ExpectedALPNProtocol" => "bar", + "ExpectedALPNProtocol" => "bar", }, }, { - name => "alpn-client-honours-server-pref", - server => { }, - client => { }, + name => "alpn-server-honours-server-pref", + server => { + extra => { + "ALPNProtocols" => "bar,foo", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + }, + }, test => { - "ClientALPNProtocols" => "foo,bar", - "ServerALPNProtocols" => "bar,foo", - "ExpectedALPNProtocol" => "bar", + "ExpectedALPNProtocol" => "bar", }, }, { name => "alpn-alert-on-mismatch", - server => { }, - client => { }, + server => { + extra => { + "ALPNProtocols" => "baz", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + }, + }, test => { - "ClientALPNProtocols" => "foo,bar", - "ServerALPNProtocols" => "baz", - "ExpectedResult" => "ServerFail", - "ServerAlert" => "NoApplicationProtocol", + "ExpectedResult" => "ServerFail", + "ExpectedServerAlert" => "NoApplicationProtocol", }, }, { name => "alpn-no-server-support", server => { }, - client => { }, + client => { + extra => { + "ALPNProtocols" => "foo", + }, + }, test => { - "ClientALPNProtocols" => "foo", - "ExpectedALPNProtocol" => undef, + "ExpectedALPNProtocol" => undef, }, }, { name => "alpn-no-client-support", - server => { }, + server => { + extra => { + "ALPNProtocols" => "foo", + }, + }, client => { }, test => { - "ServerALPNProtocols" => "foo", - "ExpectedALPNProtocol" => undef, + "ExpectedALPNProtocol" => undef, }, }, { name => "alpn-with-sni-no-context-switch", - server => { }, - server2 => { }, - client => { }, + server => { + extra => { + "ALPNProtocols" => "foo", + "ServerNameCallback" => "IgnoreMismatch", + }, + }, + server2 => { + extra => { + "ALPNProtocols" => "bar", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + "ServerName" => "server1", + }, + }, test => { - "ClientALPNProtocols" => "foo,bar", - "ServerALPNProtocols" => "foo", - "Server2ALPNProtocols" => "bar", - "ServerName" => "server1", - "ServerNameCallback" => "IgnoreMismatch", - "ExpectedServerName" => "server1", - "ExpectedALPNProtocol" => "foo", + "ExpectedServerName" => "server1", + "ExpectedALPNProtocol" => "foo", }, }, { name => "alpn-with-sni-context-switch", - server => { }, - server2 => { }, - client => { }, + server => { + extra => { + "ALPNProtocols" => "foo", + "ServerNameCallback" => "IgnoreMismatch", + }, + }, + server2 => { + extra => { + "ALPNProtocols" => "bar", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + "ServerName" => "server2", + }, + }, test => { - "ClientALPNProtocols" => "foo,bar", - "ServerALPNProtocols" => "foo", - "Server2ALPNProtocols" => "bar", - "ServerName" => "server2", - "ServerNameCallback" => "IgnoreMismatch", - "ExpectedServerName" => "server2", - "ExpectedALPNProtocol" => "bar", + "ExpectedServerName" => "server2", + "ExpectedALPNProtocol" => "bar", }, }, { name => "alpn-selected-sni-server-supports-alpn", - server => { }, - server2 => { }, - client => { }, + server => { + extra => { + "ServerNameCallback" => "IgnoreMismatch", + }, + }, + server2 => { + extra => { + "ALPNProtocols" => "bar", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + "ServerName" => "server2", + }, + }, test => { - "ClientALPNProtocols" => "foo,bar", - "Server2ALPNProtocols" => "bar", - "ServerName" => "server2", - "ServerNameCallback" => "IgnoreMismatch", - "ExpectedServerName" => "server2", - "ExpectedALPNProtocol" => "bar", + "ExpectedServerName" => "server2", + "ExpectedALPNProtocol" => "bar", }, }, { name => "alpn-selected-sni-server-does-not-support-alpn", - server => { }, + server => { + extra => { + "ALPNProtocols" => "bar", + "ServerNameCallback" => "IgnoreMismatch", + }, + }, server2 => { }, - client => { }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + "ServerName" => "server2", + }, + }, + test => { + "ExpectedServerName" => "server2", + "ExpectedALPNProtocol" => undef, + }, + }, + { + name => "alpn-simple-resumption", + server => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + test => { + "HandshakeMode" => "Resume", + "ResumptionExpected" => "Yes", + "ExpectedALPNProtocol" => "foo", + }, + }, + { + name => "alpn-server-switch-resumption", + server => { + extra => { + "ALPNProtocols" => "bar,foo", + }, + }, + resume_server => { + extra => { + "ALPNProtocols" => "baz,foo", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar,baz", + }, + }, + test => { + "HandshakeMode" => "Resume", + "ResumptionExpected" => "Yes", + "ExpectedALPNProtocol" => "baz", + }, + }, + { + name => "alpn-client-switch-resumption", + server => { + extra => { + "ALPNProtocols" => "foo,bar,baz", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,baz", + }, + }, + resume_client => { + extra => { + "ALPNProtocols" => "bar,baz", + }, + }, + test => { + "HandshakeMode" => "Resume", + "ResumptionExpected" => "Yes", + "ExpectedALPNProtocol" => "bar", + }, + }, + { + name => "alpn-alert-on-mismatch-resumption", + server => { + extra => { + "ALPNProtocols" => "bar", + }, + }, + resume_server => { + extra => { + "ALPNProtocols" => "baz", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo,bar", + }, + }, + test => { + "HandshakeMode" => "Resume", + "ExpectedResult" => "ServerFail", + "ExpectedServerAlert" => "NoApplicationProtocol", + }, + }, + { + name => "alpn-no-server-support-resumption", + server => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + resume_server => { }, + client => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + test => { + "HandshakeMode" => "Resume", + "ResumptionExpected" => "Yes", + "ExpectedALPNProtocol" => undef, + }, + }, + { + name => "alpn-no-client-support-resumption", + server => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + client => { + extra => { + "ALPNProtocols" => "foo", + }, + }, + resume_client => { + }, test => { - "ClientALPNProtocols" => "foo,bar", - "ServerALPNProtocols" => "foo", - "ServerName" => "server2", - "ServerNameCallback" => "IgnoreMismatch", - "ExpectedServerName" => "server2", - "ExpectedALPNProtocol" => undef, + "HandshakeMode" => "Resume", + "ResumptionExpected" => "Yes", + "ExpectedALPNProtocol" => undef, }, }, );