aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>2024-01-30 10:31:00 +0100
committerMatt Caswell <matt@openssl.org>2024-02-09 08:16:56 +0000
commit5f7694c825131e3f364388e42cda5aeac0f37754 (patch)
tree9a5d9cba83b8317074b7947b9f63f814d9b0a0ba
parentab36435efa2a238177b182161a356400a02daaf6 (diff)
downloadopenssl-5f7694c825131e3f364388e42cda5aeac0f37754.tar.gz
Skip tests if build does not support dtls1.2 or tls1.2
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/23319)
-rw-r--r--test/recipes/70-test_sslrecords.t35
1 files changed, 22 insertions, 13 deletions
diff --git a/test/recipes/70-test_sslrecords.t b/test/recipes/70-test_sslrecords.t
index 02110714e9..a7d13c3abc 100644
--- a/test/recipes/70-test_sslrecords.t
+++ b/test/recipes/70-test_sslrecords.t
@@ -26,9 +26,6 @@ plan skip_all => "$test_name needs the dynamic engine feature enabled"
plan skip_all => "$test_name needs the sock feature enabled"
if disabled("sock");
-plan skip_all => "$test_name needs TLSv1.2 enabled"
- if disabled("tls1_2");
-
my $testplanisset = 0;
my $inject_recs_num = undef;
my $content_type = undef;
@@ -37,15 +34,31 @@ my $fatal_alert = undef; # set by filters at expected fatal alerts
my $sslv2testtype = undef;
my $proxy_start_success = 0;
-# Run tests with TLS
-run_tests(0);
-# Run tests with DTLS
-run_tests(1);
+my $proxy = TLSProxy::Proxy->new(
+ undef,
+ cmdstr(app([ "openssl" ]), display => 1),
+ srctop_file("apps", "server.pem"),
+ (!$ENV{HARNESS_ACTIVE} || $ENV{HARNESS_VERBOSE})
+);
+
+$proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
+plan tests => 42;
+
+SKIP: {
+ skip "TLS 1.2 is disabled", 21 if disabled("tls1_2");
+ # Run tests with TLS
+ run_tests(0);
+}
+
+SKIP: {
+ skip "DTLS 1.2 is disabled", 21 if disabled("dtls1_2");
+ # Run tests with DTLS
+ run_tests(1);
+}
sub run_tests
{
my $run_test_as_dtls = shift;
- my $proxy;
if ($run_test_as_dtls == 1) {
$proxy = TLSProxy::Proxy->new_dtls(
\&add_empty_recs_filter,
@@ -71,11 +84,7 @@ sub run_tests
$fatal_alert = 0;
$proxy->serverflags("-tls1_2");
$proxy->clientflags("-no_tls1_3");
- $proxy->start() or plan skip_all => "Unable to start up Proxy for tests";
- if ($testplanisset == 0) {
- plan tests => 42;
- $testplanisset = 1;
- }
+ $proxy->start();
ok($fatal_alert, "Out of context empty records test");
}