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 <tjh@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26801)
This commit is contained in:
Tomas Mraz 2025-02-21 16:47:44 +01:00
parent f9aaeacbf9
commit 5a9966dd3a

View File

@ -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;