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");
$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;