From: Tomas Mraz Date: Fri, 21 Feb 2025 15:47:44 +0000 (+0100) Subject: 70-test_tls13cookie.t: Change the order of the test cases X-Git-Tag: openssl-3.5.0-alpha1~78 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a9966dd3a69346fff7afb3dea7afe422c04a37e;p=thirdparty%2Fopenssl.git 70-test_tls13cookie.t: Change the order of the test cases As the COOKIE_ONLY cannot run on no-ecx build. Reviewed-by: Tim Hudson Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/26801) --- diff --git a/test/recipes/70-test_tls13cookie.t b/test/recipes/70-test_tls13cookie.t index bcc29b88f32..312373c63b0 100644 --- a/test/recipes/70-test_tls13cookie.t +++ b/test/recipes/70-test_tls13cookie.t @@ -42,23 +42,9 @@ my $cookieseen = 0; my $testtype; #Test 1: Inserting a cookie into an HRR should see it echoed in the ClientHello -$testtype = COOKIE_ONLY; -$proxy->filter(\&cookie_filter); -$proxy->serverflags("-curves X25519"); -$proxy->clientflags("-curves X25519:secp256r1"); -$proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; -plan tests => 2; -SKIP: { - skip "ECX disabled", 1, if (disabled("ecx")); - ok(TLSProxy::Message->success() && $cookieseen == 1, "Cookie seen"); -} - - - -#Test 2: Same as test 1 but should also work where a new key_share is also -# required +# (when a key share is required) $testtype = COOKIE_AND_KEY_SHARE; -$proxy->clear(); +$proxy->filter(\&cookie_filter); if (disabled("ecx")) { $proxy->clientflags("-curves ffdhe3072:ffdhe2048"); $proxy->serverflags("-curves ffdhe2048"); @@ -66,9 +52,22 @@ if (disabled("ecx")) { $proxy->clientflags("-curves P-256:X25519"); $proxy->serverflags("-curves X25519"); } -$proxy->start(); +$proxy->start() or plan skip_all => "Unable to start up Proxy for tests"; +plan tests => 2; ok(TLSProxy::Message->success() && $cookieseen == 1, "Cookie seen"); +#Test 2: Inserting a cookie into an HRR should see it echoed in the ClientHello +# (without a key share required) +SKIP: { + skip "ECX disabled", 1, if (disabled("ecx")); + $testtype = COOKIE_ONLY; + $proxy->clear(); + $proxy->serverflags("-curves X25519"); + $proxy->clientflags("-curves X25519:secp256r1"); + $proxy->start(); + ok(TLSProxy::Message->success() && $cookieseen == 1, "Cookie seen"); +} + sub cookie_filter { my $proxy = shift;