test/recipes/30-test_evp.t: Modify to test with different providers
Different providers will give different results, and we need to test them all. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9398)
This commit is contained in:
parent
3b5d61f472
commit
e2f72313cc
5 changed files with 57 additions and 8 deletions
14
test/default-and-legacy.cnf
Normal file
14
test/default-and-legacy.cnf
Normal file
|
@ -0,0 +1,14 @@
|
|||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
default = default_sect
|
||||
legacy = legacy_sect
|
||||
|
||||
[default_sect]
|
||||
activate = 1
|
||||
|
||||
[legacy_sect]
|
||||
activate = 1
|
10
test/default.cnf
Normal file
10
test/default.cnf
Normal file
|
@ -0,0 +1,10 @@
|
|||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
default = default_sect
|
||||
|
||||
[default_sect]
|
||||
activate = 1
|
10
test/fips.cnf
Normal file
10
test/fips.cnf
Normal file
|
@ -0,0 +1,10 @@
|
|||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
fips = fips_sect
|
||||
|
||||
[fips_sect]
|
||||
activate = 1
|
10
test/legacy.cnf
Normal file
10
test/legacy.cnf
Normal file
|
@ -0,0 +1,10 @@
|
|||
openssl_conf = openssl_init
|
||||
|
||||
[openssl_init]
|
||||
providers = provider_sect
|
||||
|
||||
[provider_sect]
|
||||
legacy = legacy_sect
|
||||
|
||||
[legacy_sect]
|
||||
activate = 1
|
|
@ -10,19 +10,24 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir);
|
||||
use OpenSSL::Test qw(:DEFAULT data_file bldtop_dir srctop_file);
|
||||
|
||||
setup("test_evp");
|
||||
|
||||
my @files = ( "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 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(@files);
|
||||
plan tests => scalar(@configs) * scalar(@files);
|
||||
|
||||
$ENV{OPENSSL_MODULES} = bldtop_dir("providers");
|
||||
|
||||
foreach my $f ( @files ) {
|
||||
ok(run(test(["evp_test", data_file("$f")])),
|
||||
"running evp_test $f");
|
||||
foreach (@configs) {
|
||||
$ENV{OPENSSL_CONF} = srctop_file("test", $_);
|
||||
|
||||
foreach my $f ( @files ) {
|
||||
ok(run(test(["evp_test", data_file("$f")])),
|
||||
"running evp_test $f");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue