plan tests => 8;
ok($fatal_alert, "Duplicate ClientHello extension");
-$fatal_alert = 0;
-$proxy->clear();
-$proxy->filter(\&inject_duplicate_extension_serverhello);
-$proxy->clientflags("-no_tls1_3");
-$proxy->start();
-ok($fatal_alert, "Duplicate ServerHello extension");
-
SKIP: {
- skip "TLS <= 1.2 disabled", 2 if $no_below_tls13;
+ skip "TLS <= 1.2 disabled", 4 if $no_below_tls13;
+
+ $fatal_alert = 0;
+ $proxy->clear();
+ $proxy->filter(\&inject_duplicate_extension_serverhello);
+ $proxy->clientflags("-no_tls1_3");
+ $proxy->start();
+ ok($fatal_alert, "Duplicate ServerHello extension");
#Test 3: Sending a zero length extension block should pass
$proxy->clear();
$proxy->clientflags("-no_tls1_3 -noservername");
$proxy->start();
ok($fatal_alert, "Unsolicited server name extension");
+
+ #Test 5: Send the cryptopro extension in a ClientHello. Normally this is an
+ # unsolicited extension only ever seen in the ServerHello. We should
+ # ignore it in a ClientHello
+ $proxy->clear();
+ $proxy->filter(\&inject_cryptopro_extension);
+ $proxy->clientflags("-no_tls1_3");
+ $proxy->start();
+ ok(TLSProxy::Message->success(), "Cryptopro extension in ClientHello");
}
+
SKIP: {
skip "TLS <= 1.2 disabled or EC disabled", 1
if $no_below_tls13 || disabled("ec");
- #Test 5: Inject a noncompliant supported_groups extension (<= TLSv1.2)
+ #Test 6: Inject a noncompliant supported_groups extension (<= TLSv1.2)
$proxy->clear();
$proxy->filter(\&inject_unsolicited_extension);
$testtype = NONCOMPLIANT_SUPPORTED_GROUPS;
SKIP: {
skip "TLS <= 1.2 or CT disabled", 1
if $no_below_tls13 || disabled("ct");
- #Test 6: Same as above for the SCT extension which has special handling
+ #Test 7: Same as above for the SCT extension which has special handling
$fatal_alert = 0;
$proxy->clear();
+ $proxy->filter(\&inject_unsolicited_extension);
$testtype = UNSOLICITED_SCT;
$proxy->clientflags("-no_tls1_3");
$proxy->start();
SKIP: {
skip "TLS 1.3 disabled", 1
if disabled("tls1_3") || (disabled("ec") && disabled("dh"));
- #Test 7: Inject an unsolicited extension (TLSv1.3)
+ #Test 8: Inject an unsolicited extension (TLSv1.3)
$fatal_alert = 0;
$proxy->clear();
$proxy->filter(\&inject_unsolicited_extension);
$proxy->start();
ok($fatal_alert, "Unsolicited server name extension (TLSv1.3)");
}
-
-#Test 8: Send the cryptopro extension in a ClientHello. Normally this is an
-# unsolicited extension only ever seen in the ServerHello. We should
-# ignore it in a ClientHello
-$proxy->clear();
-$proxy->filter(\&inject_cryptopro_extension);
-$proxy->clientflags("-no_tls1_3");
-$proxy->start();
-ok(TLSProxy::Message->success(), "Cryptopro extension in ClientHello");