diff options
author | Richard Levitte <levitte@openssl.org> | 2020-09-29 10:26:19 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2021-03-03 14:47:43 +0100 |
commit | e25b4db754b2327be27fa0c1a4f6e66f57368293 (patch) | |
tree | 9f5f4df34fb7d5d371fb34fd64f2f00d6a53ae8c | |
parent | e9d74dbd3676603a257cedcdcbd720a3a9a775a5 (diff) |
TEST: Remove the build of fipsmodule.cnf from test recipes
The exception is the test recipe that tests 'openssl fipsinstall'.
However, that one uses a different output file name, so it's safe.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14320)
-rw-r--r-- | test/recipes/03-test_fipsinstall.t | 7 | ||||
-rw-r--r-- | test/recipes/15-test_gendsa.t | 11 | ||||
-rw-r--r-- | test/recipes/15-test_genrsa.t | 11 | ||||
-rw-r--r-- | test/recipes/15-test_rsaoaep.t | 40 | ||||
-rw-r--r-- | test/recipes/20-test_cli_fips.t | 17 | ||||
-rw-r--r-- | test/recipes/30-test_acvp.t | 10 | ||||
-rw-r--r-- | test/recipes/30-test_defltfips.t | 10 | ||||
-rw-r--r-- | test/recipes/30-test_evp.t | 11 | ||||
-rw-r--r-- | test/recipes/30-test_evp_fetch_prov.t | 15 | ||||
-rw-r--r-- | test/recipes/30-test_evp_libctx.t | 8 | ||||
-rw-r--r-- | test/recipes/30-test_provider_status.t | 10 | ||||
-rw-r--r-- | test/recipes/65-test_cmp_client.t | 8 | ||||
-rw-r--r-- | test/recipes/65-test_cmp_msg.t | 8 | ||||
-rw-r--r-- | test/recipes/65-test_cmp_protect.t | 8 | ||||
-rw-r--r-- | test/recipes/65-test_cmp_server.t | 8 | ||||
-rw-r--r-- | test/recipes/65-test_cmp_vfy.t | 8 | ||||
-rw-r--r-- | test/recipes/80-test_cmp_http.t | 2 | ||||
-rw-r--r-- | test/recipes/80-test_cms.t | 8 | ||||
-rw-r--r-- | test/recipes/80-test_ssl_new.t | 12 | ||||
-rw-r--r-- | test/recipes/80-test_ssl_old.t | 12 | ||||
-rw-r--r-- | test/recipes/81-test_cmp_cli.t | 2 | ||||
-rw-r--r-- | test/recipes/90-test_sslapi.t | 8 | ||||
-rw-r--r-- | test/recipes/90-test_threads.t | 12 |
23 files changed, 39 insertions, 207 deletions
diff --git a/test/recipes/03-test_fipsinstall.t b/test/recipes/03-test_fipsinstall.t index 4b189420ea..d603b24356 100644 --- a/test/recipes/03-test_fipsinstall.t +++ b/test/recipes/03-test_fipsinstall.t @@ -9,7 +9,7 @@ use strict; use warnings; -use File::Spec; +use File::Spec::Functions qw(:DEFAULT abs2rel); use File::Copy; use OpenSSL::Glob; use OpenSSL::Test qw/:DEFAULT srctop_dir srctop_file bldtop_dir bldtop_file/; @@ -235,7 +235,8 @@ SKIP: { "fipsinstall fails when the asymmetric cipher result is corrupted"); } -$ENV{OPENSSL_CONF_INCLUDE} = "."; +# 'local' ensures that this change is only done in this file. +local $ENV{OPENSSL_CONF_INCLUDE} = abs2rel(curdir()); ok(replace_parent_line_file('fips.cnf', 'fips_parent.cnf') && run(app(['openssl', 'fipsinstall', '-config', 'fips_parent.cnf'])), @@ -271,5 +272,3 @@ ok(replace_parent_line_file('fips_bad_module_mac.cnf', && !run(app(['openssl', 'fipsinstall', '-config', 'fips_parent_bad_module_mac.cnf'])), "verify load config fail bad module mac"); - -delete $ENV{OPENSSL_CONF_INCLUDE}; diff --git a/test/recipes/15-test_gendsa.t b/test/recipes/15-test_gendsa.t index 36189c4767..b495b08bda 100644 --- a/test/recipes/15-test_gendsa.t +++ b/test/recipes/15-test_gendsa.t @@ -20,7 +20,6 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; plan skip_all => "This test is unsupported in a no-dsa build" if disabled("dsa"); @@ -28,7 +27,7 @@ plan skip_all => "This test is unsupported in a no-dsa build" my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan tests => - ($no_fips ? 0 : 3) # FIPS install test + fips related tests + ($no_fips ? 0 : 2) # FIPS related tests + 11; ok(run(app([ 'openssl', 'genpkey', '-genparam', @@ -113,14 +112,6 @@ unless ($no_fips) { my $provpath = bldtop_dir("providers"); my @prov = ( "-provider-path", $provpath, "-config", $provconf); - my $infile = bldtop_file('providers', platform->dso('fips')); - - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile, - '-provider_name', 'fips', '-mac_name', 'HMAC', - '-section_name', 'fips_sect'])), - "fipsinstall"); $ENV{OPENSSL_TEST_LIBCTX} = "1"; diff --git a/test/recipes/15-test_genrsa.t b/test/recipes/15-test_genrsa.t index 504e279f75..95390c5ff4 100644 --- a/test/recipes/15-test_genrsa.t +++ b/test/recipes/15-test_genrsa.t @@ -20,12 +20,11 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan tests => - ($no_fips ? 0 : 2) # FIPS install test + fips related test + ($no_fips ? 0 : 1) # Extra FIPS related test + 13; # We want to know that an absurdly small number of bits isn't support @@ -124,14 +123,6 @@ unless ($no_fips) { my $provpath = bldtop_dir("providers"); my @prov = ( "-provider-path", $provpath, "-config", $provconf); - my $infile = bldtop_file('providers', platform->dso('fips')); - - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile, - '-provider_name', 'fips', '-mac_name', 'HMAC', - '-section_name', 'fips_sect'])), - "fipsinstall"); $ENV{OPENSSL_TEST_LIBCTX} = "1"; ok(run(app(['openssl', 'genpkey', diff --git a/test/recipes/15-test_rsaoaep.t b/test/recipes/15-test_rsaoaep.t index ddbfe84bd7..47aac78f35 100644 --- a/test/recipes/15-test_rsaoaep.t +++ b/test/recipes/15-test_rsaoaep.t @@ -18,13 +18,11 @@ BEGIN { } use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; -my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); my $no_check = disabled('fips-securitychecks'); plan tests => - ($no_fips ? 0 : 1 + ($no_check ? 0 : 1)) # FIPS install test + ($no_check ? 0 : 1) # FIPS security check + 9; my @prov = ( ); @@ -40,29 +38,21 @@ my $dec3_file = "dec3.txt"; my $key_file = srctop_file("test", "testrsa2048.pem"); my $small_key_file = srctop_file("test", "testrsa.pem"); -unless ($no_fips) { +$ENV{OPENSSL_TEST_LIBCTX} = "1"; + +unless ($no_check) { @prov = ( "-provider-path", $provpath, "-config", $provconf ); - my $infile = bldtop_file('providers', platform->dso('fips')); - - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); - $ENV{OPENSSL_TEST_LIBCTX} = "1"; - - unless ($no_check) { - ok(!run(app(['openssl', 'pkeyutl', - @prov, - '-encrypt', - '-in', $msg_file, - '-inkey', $small_key_file, - '-pkeyopt', 'pad-mode:oaep', - '-pkeyopt', 'oaep-label:123', - '-pkeyopt', 'digest:sha1', - '-pkeyopt', 'mgf1-digest:sha1', - '-out', $enc1_file])), - "RSA OAEP Encryption with a key smaller than 2048 in fips mode should fail"); - } + ok(!run(app(['openssl', 'pkeyutl', + @prov, + '-encrypt', + '-in', $msg_file, + '-inkey', $small_key_file, + '-pkeyopt', 'pad-mode:oaep', + '-pkeyopt', 'oaep-label:123', + '-pkeyopt', 'digest:sha1', + '-pkeyopt', 'mgf1-digest:sha1', + '-out', $enc1_file])), + "RSA OAEP Encryption with a key smaller than 2048 in fips mode should fail"); } ok(run(app(['openssl', 'pkeyutl', diff --git a/test/recipes/20-test_cli_fips.t b/test/recipes/20-test_cli_fips.t index 591b497027..e7291df456 100644 --- a/test/recipes/20-test_cli_fips.t +++ b/test/recipes/20-test_cli_fips.t @@ -23,10 +23,10 @@ use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); use platform; -my $no_check = disabled('fips-securitychecks'); +my $no_check = disabled("fips") || disabled('fips-securitychecks'); plan skip_all => "Test only supported in a fips build with security checks" - if disabled("fips") || disabled("fips-securitychecks"); -plan tests => 13; + if $no_check; +plan tests => 11; my $fipsmodule = bldtop_file('providers', platform->dso('fips')); my $fipsconf = srctop_file("test", "fips-and-base.cnf"); @@ -34,17 +34,6 @@ my $defaultconf = srctop_file("test", "default.cnf"); my $tbs_data = $fipsmodule; my $bogus_data = $fipsconf; -# output a fipsmodule.cnf file containing mac data -ok(run(app(['openssl', 'fipsinstall', '-out', 'fipsmodule.cnf', - '-module', $fipsmodule, ])), - "fipsinstall"); - -# verify the $fipsconf file -ok(run(app(['openssl', 'fipsinstall', '-in', 'fipsmodule.cnf', '-module', $fipsmodule, - '-verify'])), - "fipsinstall verify"); - -$ENV{OPENSSL_CONF_INCLUDE} = abs2rel(curdir()); $ENV{OPENSSL_CONF} = $fipsconf; ok(run(app(['openssl', 'list', '-public-key-methods', '-verbose'])), diff --git a/test/recipes/30-test_acvp.t b/test/recipes/30-test_acvp.t index 8cfc07ecf7..f86055666e 100644 --- a/test/recipes/30-test_acvp.t +++ b/test/recipes/30-test_acvp.t @@ -23,16 +23,8 @@ plan skip_all => "ACVP is not supported by this test" use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; -my $infile = bldtop_file('providers', platform->dso('fips')); - -plan tests => 2; - -ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); +plan tests => 1; ok(run(test(["acvp_test", "-config", srctop_file("test","fips.cnf")])), "running acvp_test"); diff --git a/test/recipes/30-test_defltfips.t b/test/recipes/30-test_defltfips.t index c98591eb86..afdfd0ac70 100644 --- a/test/recipes/30-test_defltfips.t +++ b/test/recipes/30-test_defltfips.t @@ -20,21 +20,13 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan tests => - ($no_fips ? 1 : 3); + ($no_fips ? 1 : 2); unless ($no_fips) { - my $infile = bldtop_file('providers', platform->dso('fips')); - - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); - $ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "fips.cnf")); ok(run(test(["defltfips_test", "fips"])), "running defltfips_test fips"); } diff --git a/test/recipes/30-test_evp.t b/test/recipes/30-test_evp.t index 44ea3d01f3..3398a1ab9a 100644 --- a/test/recipes/30-test_evp.t +++ b/test/recipes/30-test_evp.t @@ -19,7 +19,6 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); my $no_legacy = disabled('legacy') || ($ENV{NO_LEGACY} // 0); @@ -108,20 +107,10 @@ push @defltfiles, qw(evppkey_brainpool.txt) unless $no_ec; push @defltfiles, qw(evppkey_sm2.txt) unless $no_sm2; plan tests => - ($no_fips ? 0 : 1) # FIPS install test + (scalar(@configs) * scalar(@files)) + scalar(@defltfiles) + 3; # error output tests -unless ($no_fips) { - my $infile = bldtop_file('providers', platform->dso('fips')); - - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); -} - foreach (@configs) { my $conf = srctop_file("test", $_); diff --git a/test/recipes/30-test_evp_fetch_prov.t b/test/recipes/30-test_evp_fetch_prov.t index 81b3c62cc4..e033f49d63 100644 --- a/test/recipes/30-test_evp_fetch_prov.t +++ b/test/recipes/30-test_evp_fetch_prov.t @@ -18,14 +18,11 @@ setup("test_evp_fetch_prov"); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); -my $infile = bldtop_file('providers', platform->dso('fips')); my @types = ( "digest", "cipher" ); -my @setups = (); my @testdata = ( { config => srctop_file("test", "default.cnf"), providers => [ 'default' ], @@ -44,12 +41,6 @@ my @testdata = ( ); unless ($no_fips) { - push @setups, { - cmd => app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile]), - message => "fipsinstall" - }; push @testdata, ( { config => srctop_file("test", "fips.cnf"), providers => [ 'fips' ], @@ -105,15 +96,11 @@ foreach (@testdata) { $testcount += scalar @{$_->{tests}}; } -plan tests => 1 + scalar @setups + $testcount * scalar(@types); +plan tests => 1 + $testcount * scalar(@types); ok(run(test(["evp_fetch_prov_test", "-defaultctx"])), "running evp_fetch_prov_test using the default libctx"); -foreach my $setup (@setups) { - ok(run($setup->{cmd}), $setup->{message}); -} - foreach my $alg (@types) { foreach my $testcase (@testdata) { $ENV{OPENSSL_CONF} = ""; diff --git a/test/recipes/30-test_evp_libctx.t b/test/recipes/30-test_evp_libctx.t index 602f29a831..36802c8d7b 100644 --- a/test/recipes/30-test_evp_libctx.t +++ b/test/recipes/30-test_evp_libctx.t @@ -20,24 +20,18 @@ my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; -my $infile = bldtop_file('providers', platform->dso('fips')); # If no fips then run the test with no extra arguments. my @test_args = ( ); plan tests => - ($no_fips ? 0 : 2) # FIPS install test + ($no_fips ? 0 : 1) # FIPS install test + 1; unless ($no_fips) { @test_args = ("-config", srctop_file("test","fips-and-base.cnf"), "-provider", "fips"); - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); ok(run(test(["evp_libctx_test", @test_args])), "running fips evp_libctx_test"); } diff --git a/test/recipes/30-test_provider_status.t b/test/recipes/30-test_provider_status.t index 03304ba4a2..0aaaf7ef49 100644 --- a/test/recipes/30-test_provider_status.t +++ b/test/recipes/30-test_provider_status.t @@ -19,21 +19,13 @@ setup("test_provider_status"); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan skip_all => "provider_status is not supported by this test" if $no_fips; -plan tests => 2; - -my $infile = bldtop_file('providers', platform->dso('fips')); - -ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); +plan tests => 1; ok(run(test(["provider_status_test", "-config", srctop_file("test","fips.cnf"), "-provider_name", "fips"])), diff --git a/test/recipes/65-test_cmp_client.t b/test/recipes/65-test_cmp_client.t index a25be81996..0cd4982e89 100644 --- a/test/recipes/65-test_cmp_client.t +++ b/test/recipes/65-test_cmp_client.t @@ -18,14 +18,13 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan skip_all => "This test is not supported in a no-cmp or no-ec build" if disabled("cmp") || disabled("ec"); -plan tests => 2 + ($no_fips ? 0 : 2); #fips install + fips test +plan tests => 2 + ($no_fips ? 0 : 1); # fips test my @basic_cmd = ("cmp_client_test", data_file("server.key"), @@ -39,10 +38,5 @@ ok(run(test([@basic_cmd, "none"]))); ok(run(test([@basic_cmd, "default", srctop_file("test", "default.cnf")]))); unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', bldtop_file('providers', platform->dso('fips'))])), - "fipsinstall"); - ok(run(test([@basic_cmd, "fips", srctop_file("test", "fips-and-base.cnf")]))); } diff --git a/test/recipes/65-test_cmp_msg.t b/test/recipes/65-test_cmp_msg.t index 8525b6539f..3fc091a461 100644 --- a/test/recipes/65-test_cmp_msg.t +++ b/test/recipes/65-test_cmp_msg.t @@ -18,14 +18,13 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); plan skip_all => "This test is not supported in a no-cmp build" if disabled("cmp"); -plan tests => 2 + ($no_fips ? 0 : 2); #fips install + fips test +plan tests => 2 + ($no_fips ? 0 : 1); #fips test my @basic_cmd = ("cmp_msg_test", data_file("new.key"), @@ -37,11 +36,6 @@ ok(run(test([@basic_cmd, "none"]))); ok(run(test([@basic_cmd, "default", srctop_file("test", "default.cnf")]))); unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', bldtop_file('providers', platform->dso('fips'))])), - "fipsinstall"); - ok(run(test([@basic_cmd, "fips", srctop_file("test", "fips-and-base.cnf")]))); } diff --git a/test/recipes/65-test_cmp_protect.t b/test/recipes/65-test_cmp_protect.t index 54219e386a..4fa7c8298b 100644 --- a/test/recipes/65-test_cmp_protect.t +++ b/test/recipes/65-test_cmp_protect.t @@ -18,7 +18,6 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); @@ -28,7 +27,7 @@ plan skip_all => "This test is not supported in a no-cmp build" plan skip_all => "This test is not supported in a shared library build on Windows" if $^O eq 'MSWin32' && !disabled("shared"); -plan tests => 2 + ($no_fips ? 0 : 2); #fips install + fips test +plan tests => 2 + ($no_fips ? 0 : 1); #fips test my @basic_cmd = ("cmp_protect_test", data_file("server.pem"), @@ -47,11 +46,6 @@ ok(run(test([@basic_cmd, "none"]))); ok(run(test([@basic_cmd, "default", srctop_file("test", "default.cnf")]))); unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', bldtop_file('providers', platform->dso('fips'))])), - "fipsinstall"); - ok(run(test([@basic_cmd, "fips", srctop_file("test", "fips-and-base.cnf")]))); } diff --git a/test/recipes/65-test_cmp_server.t b/test/recipes/65-test_cmp_server.t index 5864163f01..fb9dcef081 100644 --- a/test/recipes/65-test_cmp_server.t +++ b/test/recipes/65-test_cmp_server.t @@ -18,7 +18,6 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); @@ -28,7 +27,7 @@ plan skip_all => "This test is not supported in a no-cmp build" plan skip_all => "This test is not supported in a no-ec build" if disabled("ec"); -plan tests => 2 + ($no_fips ? 0 : 2); #fips install + fips test +plan tests => 2 + ($no_fips ? 0 : 1); #fips test my @basic_cmd = ("cmp_server_test", data_file("CR_protected_PBM_1234.der")); @@ -37,10 +36,5 @@ ok(run(test([@basic_cmd, "none"]))); ok(run(test([@basic_cmd, "default", srctop_file("test", "default.cnf")]))); unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', bldtop_file('providers', platform->dso('fips'))])), - "fipsinstall"); - ok(run(test([@basic_cmd, "fips", srctop_file("test", "fips.cnf")]))); } diff --git a/test/recipes/65-test_cmp_vfy.t b/test/recipes/65-test_cmp_vfy.t index 800dabcd85..c1851cbc6e 100644 --- a/test/recipes/65-test_cmp_vfy.t +++ b/test/recipes/65-test_cmp_vfy.t @@ -18,7 +18,6 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); @@ -28,7 +27,7 @@ plan skip_all => "This test is not supported in a no-cmp build" plan skip_all => "This test is not supported in a no-ec build" if disabled("ec"); -plan tests => 2 + ($no_fips ? 0 : 2); #fips install + fips test +plan tests => 2 + ($no_fips ? 0 : 1); #fips test my @basic_cmd = ("cmp_vfy_test", data_file("server.crt"), data_file("client.crt"), @@ -48,10 +47,5 @@ ok(run(test([@basic_cmd, "none"]))); ok(run(test([@basic_cmd, "default", srctop_file("test", "default.cnf")]))); unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', bldtop_file('providers', platform->dso('fips'))])), - "fipsinstall"); - ok(run(test([@basic_cmd, "fips", srctop_file("test", "fips.cnf")]))); } diff --git a/test/recipes/80-test_cmp_http.t b/test/recipes/80-test_cmp_http.t index 88c3b3c750..e68844ebf1 100644 --- a/test/recipes/80-test_cmp_http.t +++ b/test/recipes/80-test_cmp_http.t @@ -20,7 +20,7 @@ BEGIN { } use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; + plan skip_all => "These tests are not supported in a fuzz build" if config('options') =~ /-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION/; diff --git a/test/recipes/80-test_cms.t b/test/recipes/80-test_cms.t index 8e1478c386..8e3275c2e5 100644 --- a/test/recipes/80-test_cms.t +++ b/test/recipes/80-test_cms.t @@ -23,7 +23,6 @@ BEGIN { use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); @@ -52,16 +51,9 @@ my ($no_des, $no_dh, $no_dsa, $no_ec, $no_ec2m, $no_rc2, $no_zlib) $no_rc2 = 1 if disabled("legacy"); plan tests => - ($no_fips ? 0 : 1) # FIPS install test + 10; unless ($no_fips) { - my $infile = bldtop_file('providers', platform->dso('fips')); - - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); @config = ( "-config", srctop_file("test", "fips-and-base.cnf") ); $provname = 'fips'; } diff --git a/test/recipes/80-test_ssl_new.t b/test/recipes/80-test_ssl_new.t index 99dbdea1bb..4dc2529593 100644 --- a/test/recipes/80-test_ssl_new.t +++ b/test/recipes/80-test_ssl_new.t @@ -22,10 +22,8 @@ setup("test_ssl_new"); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); -my $infile = bldtop_file('providers', platform->dso('fips')); $ENV{TEST_CERTS_DIR} = srctop_dir("test", "certs"); @@ -36,8 +34,7 @@ map { s/\^// } @conf_files if $^O eq "VMS"; # We hard-code the number of tests to double-check that the globbing above # finds all files as expected. -plan tests => 30 # = scalar @conf_srcs - + ($no_fips ? 0 : 1); # fipsinstall +plan tests => 30; # Some test results depend on the configuration of enabled protocols. We only # verify generated sources in the default configuration. @@ -118,13 +115,6 @@ my %skip = ( "29-dtls-sctp-label-bug.cnf" => disabled("sctp") || disabled("sock"), ); -unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); -} - foreach my $conf (@conf_files) { subtest "Test configuration $conf" => sub { plan tests => 6 + ($no_fips ? 0 : 3); diff --git a/test/recipes/80-test_ssl_old.t b/test/recipes/80-test_ssl_old.t index 2f3d5d1c8c..d01b2b72a8 100644 --- a/test/recipes/80-test_ssl_old.t +++ b/test/recipes/80-test_ssl_old.t @@ -22,11 +22,8 @@ setup("test_ssl_old"); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); -my $infile = bldtop_file('providers', platform->dso('fips')); - my ($no_rsa, $no_dsa, $no_dh, $no_ec, $no_psk, $no_ssl3, $no_tls1, $no_tls1_1, $no_tls1_2, $no_tls1_3, $no_dtls, $no_dtls1, $no_dtls1_2, $no_ct) = @@ -81,18 +78,11 @@ my $client_sess="client.ss"; # If you're adding tests here, you probably want to convert them to the # new format in ssl_test.c and add recipes to 80-test_ssl_new.t instead. plan tests => - ($no_fips ? 0 : 1 + 5) # For fipsinstall + testssl with fips provider + ($no_fips ? 0 : 5) # testssl with fips provider + 1 # For testss + 5 # For the testssl with default provider ; -unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); -} - subtest 'test_ss' => sub { if (testss()) { open OUT, ">", "intP1.ss"; diff --git a/test/recipes/81-test_cmp_cli.t b/test/recipes/81-test_cmp_cli.t index 03ad986e78..e5c19a1745 100644 --- a/test/recipes/81-test_cmp_cli.t +++ b/test/recipes/81-test_cmp_cli.t @@ -21,7 +21,7 @@ BEGIN { } use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; + plan skip_all => "These tests are not supported in a fuzz build" if config('options') =~ /-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION/; diff --git a/test/recipes/90-test_sslapi.t b/test/recipes/90-test_sslapi.t index 8cef077a66..02a620367d 100644 --- a/test/recipes/90-test_sslapi.t +++ b/test/recipes/90-test_sslapi.t @@ -17,7 +17,6 @@ setup("test_sslapi"); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); @@ -25,7 +24,7 @@ plan skip_all => "No TLS/SSL protocols are supported by this OpenSSL build" if alldisabled(grep { $_ ne "ssl3" } available_protocols("tls")); plan tests => - ($no_fips ? 0 : 2) # FIPS install test + sslapitest with fips + ($no_fips ? 0 : 1) # sslapitest with fips + 1; # sslapitest with default provider (undef, my $tmpfilename) = tempfile(); @@ -37,11 +36,6 @@ ok(run(test(["sslapitest", srctop_dir("test", "certs"), "running sslapitest"); unless ($no_fips) { - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', bldtop_file('providers', platform->dso('fips'))])), - "fipsinstall"); - ok(run(test(["sslapitest", srctop_dir("test", "certs"), srctop_file("test", "recipes", "90-test_sslapi_data", "passwd.txt"), $tmpfilename, "fips", diff --git a/test/recipes/90-test_threads.t b/test/recipes/90-test_threads.t index 0410cd8007..53883ee629 100644 --- a/test/recipes/90-test_threads.t +++ b/test/recipes/90-test_threads.t @@ -18,20 +18,10 @@ setup("test_threads"); use lib srctop_dir('Configurations'); use lib bldtop_dir('.'); -use platform; my $no_fips = disabled('fips') || ($ENV{NO_FIPS} // 0); - -plan tests => 1 + ($no_fips ? 0 : 1); - -if (!$no_fips) { - my $infile = bldtop_file('providers', platform->dso('fips')); - ok(run(app(['openssl', 'fipsinstall', - '-out', bldtop_file('providers', 'fipsmodule.cnf'), - '-module', $infile])), - "fipsinstall"); -} +plan tests => 1; if ($no_fips) { $ENV{OPENSSL_CONF} = abs_path(srctop_file("test", "default.cnf")); |