Fix no-rc2 in the CMS test
authorMatt Caswell <matt@openssl.org>
Thu, 17 Mar 2016 10:14:30 +0000 (10:14 +0000)
committerMatt Caswell <matt@openssl.org>
Fri, 18 Mar 2016 12:09:27 +0000 (12:09 +0000)
The CMS test uses some RC2 keys which should be skipped if the RC2 is
disabled.

Reviewed-by: Richard Levitte <levitte@openssl.org>
test/recipes/80-test_cms.t

index e3722719ec6a89ead70176b414ee7eb48ddfa3c0..2ce8a2c6aec4e76be6a227dea4a76705ebcc978b 100644 (file)
@@ -13,7 +13,8 @@ setup("test_cms");
 
 my $smdir    = srctop_dir("test", "smime-certs");
 my $smcont   = srctop_file("test", "smcont.txt");
-my ($no_dh, $no_ec, $no_ec2m, $no_zlib) = disabled qw/dh ec ec2m zlib/;
+my ($no_dh, $no_ec, $no_ec2m, $no_rc2, $no_zlib)
+    = disabled qw/dh ec ec2m rc2 zlib/;
 
 plan tests => 4;
 
@@ -465,12 +466,15 @@ sub check_availability {
     my $tnam = shift;
 
     return "$tnam: skipped, EC disabled\n"
-       if ($no_ec && $tnam =~ /ECDH/);
+        if ($no_ec && $tnam =~ /ECDH/);
     return "$tnam: skipped, ECDH disabled\n"
-       if ($no_ec && $tnam =~ /ECDH/);
+        if ($no_ec && $tnam =~ /ECDH/);
     return "$tnam: skipped, EC2M disabled\n"
-       if ($no_ec2m && $tnam =~ /K-283/);
+        if ($no_ec2m && $tnam =~ /K-283/);
     return "$tnam: skipped, DH disabled\n"
-       if ($no_dh && $tnam =~ /X9\.42/);
+        if ($no_dh && $tnam =~ /X9\.42/);
+    return "$tnam: skipped, RC2 disabled\n"
+        if ($no_rc2 && $tnam =~ /RC2/);
+
     return "";
 }