]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Fix 3.0 branch to skip tests if using 3.4
authorslontis <shane.lontis@oracle.com>
Sun, 11 Aug 2024 23:41:36 +0000 (09:41 +1000)
committerTomas Mraz <tomas@openssl.org>
Wed, 14 Aug 2024 09:37:42 +0000 (11:37 +0200)
PR #25147 removes the POST being allowed to be skipped.
This causes issue when testing 3.0 with the 3.4 provider.

Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25159)

test/recipes/03-test_fipsinstall.t

index c39b2cee09ecc748646a9a1de008efef5a14d690..4b07d62a8eea96ac559342d0564f326f72d26560 100644 (file)
@@ -30,6 +30,9 @@ my $infile = bldtop_file('providers', platform->dso('fips'));
 my $fipskey = $ENV{FIPSKEY} // config('FIPSKEY') // '00';
 my $provconf = srctop_file("test", "fips-and-base.cnf");
 
+run(test(["fips_version_test", "-config", $provconf, "<3.4.0"]),
+          capture => 1, statusvar => \my $indicatorpost);
+
 # Read in a text $infile and replace the regular expression in $srch with the
 # value in $repl and output to a new file $outfile.
 sub replace_line_file_internal {
@@ -269,24 +272,27 @@ ok(replace_parent_line_file('fips_no_module_mac.cnf',
                 '-config', 'fips_parent_no_module_mac.cnf'])),
    "verify load config fail no module mac");
 
-ok(replace_parent_line_file('fips_no_install_mac.cnf',
-                            'fips_parent_no_install_mac.cnf')
-   && !run(app(['openssl', 'fipsinstall',
-                '-config', 'fips_parent_no_install_mac.cnf'])),
-   "verify load config fail no install mac");
-
-ok(replace_parent_line_file('fips_bad_indicator.cnf',
-                            'fips_parent_bad_indicator.cnf')
-   && !run(app(['openssl', 'fipsinstall',
-                '-config', 'fips_parent_bad_indicator.cnf'])),
-   "verify load config fail bad indicator");
-
 
-ok(replace_parent_line_file('fips_bad_install_mac.cnf',
-                            'fips_parent_bad_install_mac.cnf')
-   && !run(app(['openssl', 'fipsinstall',
-                '-config', 'fips_parent_bad_install_mac.cnf'])),
-   "verify load config fail bad install mac");
+SKIP: {
+    skip "Newer FIPS provider version does not support this feature", 3
+        if !$indicatorpost;
+
+    ok(replace_parent_line_file('fips_no_install_mac.cnf',
+                                'fips_parent_no_install_mac.cnf')
+       && !run(app(['openssl', 'fipsinstall',
+                    '-config', 'fips_parent_no_install_mac.cnf'])),
+       "verify load config fail no install mac");
+    ok(replace_parent_line_file('fips_bad_indicator.cnf',
+                                'fips_parent_bad_indicator.cnf')
+       && !run(app(['openssl', 'fipsinstall',
+                    '-config', 'fips_parent_bad_indicator.cnf'])),
+       "verify load config fail bad indicator");
+    ok(replace_parent_line_file('fips_bad_install_mac.cnf',
+                                'fips_parent_bad_install_mac.cnf')
+       && !run(app(['openssl', 'fipsinstall',
+                    '-config', 'fips_parent_bad_install_mac.cnf'])),
+       "verify load config fail bad install mac");
+}
 
 ok(replace_parent_line_file('fips_bad_module_mac.cnf',
                             'fips_parent_bad_module_mac.cnf')