]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
70-test_tls13cookie.t: Change the order of the test cases
authorTomas Mraz <tomas@openssl.org>
Fri, 21 Feb 2025 15:47:44 +0000 (16:47 +0100)
committerTomas Mraz <tomas@openssl.org>
Tue, 25 Feb 2025 14:34:24 +0000 (15:34 +0100)
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)

test/recipes/70-test_tls13cookie.t

index bcc29b88f325f406779e7b7d3ec46e6c9460af4b..312373c63b0abec9cb845369913fe1b0a02a3e9e 100644 (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;