diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2019-09-15 19:55:10 +1000 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2019-09-15 19:55:10 +1000 |
commit | 7bb82f92d94375e7673fe02cb8186595b2c539f2 (patch) | |
tree | 9ad368205615d359374430b91906e4c704135fae /test/recipes/30-test_evp.t | |
parent | dd11c5f0fa809063b152cd2851c4c1e56fbd20c8 (diff) | |
download | openssl-new-7bb82f92d94375e7673fe02cb8186595b2c539f2.tar.gz |
Add fips module integrity check
Add environment variable for setting CONF .include path
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9769)
Diffstat (limited to 'test/recipes/30-test_evp.t')
-rw-r--r-- | test/recipes/30-test_evp.t | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/test/recipes/30-test_evp.t b/test/recipes/30-test_evp.t index 7e0be81b1e..e99299ffc4 100644 --- a/test/recipes/30-test_evp.t +++ b/test/recipes/30-test_evp.t @@ -10,10 +10,16 @@ use strict; use warnings; -use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file); +use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file srctop_dir bldtop_file); use OpenSSL::Test::Utils; +BEGIN { setup("test_evp"); +} + +use lib srctop_dir('Configurations'); +use lib bldtop_dir('.'); +use platform; # Default config depends on if the legacy module is built or not my $defaultcnf = disabled('legacy') ? 'default.cnf' : 'default-and-legacy.cnf'; @@ -27,7 +33,17 @@ 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)) + scalar(@defltfiles); +plan tests => (scalar(@configs) * scalar(@files)) + scalar(@defltfiles) + 1; + +my $infile = bldtop_file('providers', platform->dso('fips')); +$ENV{OPENSSL_MODULES} = bldtop_dir("providers"); +$ENV{OPENSSL_CONF_INCLUDE} = bldtop_dir("providers"); + +ok(run(app(['openssl', 'fipsinstall', '-out', bldtop_file('providers', 'fipsinstall.conf'), + '-module', $infile, + '-provider_name', 'fips', '-mac_name', 'HMAC', + '-macopt', 'digest:SHA256', '-macopt', 'hexkey:00', + '-section_name', 'fips_sect'])), "fipinstall"); foreach (@configs) { $ENV{OPENSSL_CONF} = srctop_file("test", $_); |