diff options
author | Matt Caswell <matt@openssl.org> | 2019-08-05 14:38:25 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-08-07 12:40:40 +0200 |
commit | f305ecdac0b7048e7ef38a7196f4393fa7ceff38 (patch) | |
tree | 76cce16591d188cca6f2a7d2008064ea7ceec2ee /test/recipes/30-test_evp.t | |
parent | Don't set ctx->cipher until after a successful fetch (diff) | |
download | openssl-f305ecdac0b7048e7ef38a7196f4393fa7ceff38.tar.xz openssl-f305ecdac0b7048e7ef38a7196f4393fa7ceff38.zip |
Run evp_test in FIPS mode
We run the cipher and digest evp_test test files in FIPS mode. Some
ciphers/digests aren't available in FIPS mode so we mark those as
only being available in the default provider.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9531)
Diffstat (limited to 'test/recipes/30-test_evp.t')
-rw-r--r-- | test/recipes/30-test_evp.t | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/test/recipes/30-test_evp.t b/test/recipes/30-test_evp.t index 01bf99df6f..2159d96df4 100644 --- a/test/recipes/30-test_evp.t +++ b/test/recipes/30-test_evp.t @@ -14,15 +14,13 @@ use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file); setup("test_evp"); -#TODO(3.0) We temporarily disable testing with the FIPS module while that -# testing is broken -#my @configs = qw( default-and-legacy.cnf fips.cnf ); -my @configs = qw( default-and-legacy.cnf ); -my @files = qw( evpciph.txt evpdigest.txt evpencod.txt evpkdf.txt - evppkey_kdf.txt evpmac.txt evppbe.txt evppkey.txt - evppkey_ecc.txt evpcase.txt evpaessiv.txt evpccmcavs.txt ); +my @configs = qw( default-and-legacy.cnf fips.cnf ); +my @files = qw( evpciph.txt evpdigest.txt ); +my @defltfiles = qw( evpencod.txt evpkdf.txt evppkey_kdf.txt evpmac.txt + evppbe.txt evppkey.txt evppkey_ecc.txt evpcase.txt evpaessiv.txt + evpccmcavs.txt ); -plan tests => scalar(@configs) * scalar(@files); +plan tests => (scalar(@configs) * scalar(@files)) + scalar(@defltfiles); $ENV{OPENSSL_MODULES} = bldtop_dir("providers"); @@ -34,3 +32,13 @@ foreach (@configs) { "running evp_test $f"); } } + +#TODO(3.0): As more operations are converted to providers we can move more of +# these tests to the loop above + +$ENV{OPENSSL_CONF} = srctop_file("test", "default-and-legacy.cnf"); + +foreach my $f ( @defltfiles ) { + ok(run(test(["evp_test", data_file("$f")])), + "running evp_test $f"); +} |