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 /test/recipes/15-test_rsaoaep.t | |
parent | e9d74dbd3676603a257cedcdcbd720a3a9a775a5 (diff) | |
download | openssl-new-e25b4db754b2327be27fa0c1a4f6e66f57368293.tar.gz |
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)
Diffstat (limited to 'test/recipes/15-test_rsaoaep.t')
-rw-r--r-- | test/recipes/15-test_rsaoaep.t | 40 |
1 files changed, 15 insertions, 25 deletions
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', |