mirror of https://github.com/openssl/openssl.git
remove loader_attic tests from test_store
With the removal of engines we need to handle the loader_attic test that will fail with said removal based on the advice of @levitte, given that we have a file: loader in the default provider already, theres no need to test an engine thats going away, so just remove it. Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/28461)
This commit is contained in:
parent
ccf6a2303e
commit
e4dd4a8bc8
|
|
@ -97,7 +97,6 @@ my @noexist_file_files =
|
||||||
|
|
||||||
# There is more than one method to get a 'file:' loader.
|
# There is more than one method to get a 'file:' loader.
|
||||||
# The default is a built-in provider implementation.
|
# The default is a built-in provider implementation.
|
||||||
# However, there is also an engine, specially for testing purposes.
|
|
||||||
#
|
#
|
||||||
# @methods is a collection of extra 'openssl storeutl' arguments used to
|
# @methods is a collection of extra 'openssl storeutl' arguments used to
|
||||||
# try the different methods.
|
# try the different methods.
|
||||||
|
|
@ -105,8 +104,6 @@ my @methods;
|
||||||
my @prov_method = qw(-provider default);
|
my @prov_method = qw(-provider default);
|
||||||
push @prov_method, qw(-provider legacy) unless disabled('legacy');
|
push @prov_method, qw(-provider legacy) unless disabled('legacy');
|
||||||
push @methods, [ @prov_method ];
|
push @methods, [ @prov_method ];
|
||||||
push @methods, [qw(-engine loader_attic)]
|
|
||||||
unless disabled('loadereng');
|
|
||||||
|
|
||||||
my $n = 4 + scalar @methods
|
my $n = 4 + scalar @methods
|
||||||
* ( (3 * scalar @noexist_files)
|
* ( (3 * scalar @noexist_files)
|
||||||
|
|
@ -118,17 +115,6 @@ my $n = 4 + scalar @methods
|
||||||
+ 3
|
+ 3
|
||||||
+ 11 );
|
+ 11 );
|
||||||
|
|
||||||
# Test doesn't work under msys because the file name munging doesn't work
|
|
||||||
# correctly with the "ot:" prefix
|
|
||||||
my $do_test_ossltest_store =
|
|
||||||
!(disabled("engine") || disabled("dynamic-engine") || $^O =~ /^msys$/);
|
|
||||||
|
|
||||||
if ($do_test_ossltest_store) {
|
|
||||||
# test loading with apps 'org.openssl.engine:' loader, using the
|
|
||||||
# ossltest engine.
|
|
||||||
$n += 4 * scalar @src_rsa_files;
|
|
||||||
}
|
|
||||||
|
|
||||||
plan skip_all => "No plan" if $n == 0;
|
plan skip_all => "No plan" if $n == 0;
|
||||||
|
|
||||||
plan tests => $n;
|
plan tests => $n;
|
||||||
|
|
@ -142,32 +128,6 @@ ok(!run(app(["openssl", "storeutl", $test_x509, "-crls"])),
|
||||||
"storeutil with extra parameter (at end) should fail");
|
"storeutil with extra parameter (at end) should fail");
|
||||||
|
|
||||||
indir "store_$$" => sub {
|
indir "store_$$" => sub {
|
||||||
if ($do_test_ossltest_store) {
|
|
||||||
# ossltest loads PEM files, with names prefixed with 'ot:'.
|
|
||||||
# This prefix ensures that the files are, in fact, loaded through
|
|
||||||
# that engine and not mistakenly going through the 'file:' loader.
|
|
||||||
|
|
||||||
my $engine_scheme = 'org.openssl.engine:';
|
|
||||||
$ENV{OPENSSL_ENGINES} = bldtop_dir("engines");
|
|
||||||
|
|
||||||
foreach (@src_rsa_files) {
|
|
||||||
my $file = srctop_file($_);
|
|
||||||
my $file_abs = to_abs_file($file);
|
|
||||||
my @pubin = $_ =~ m|pub\.pem$| ? ("-pubin") : ();
|
|
||||||
|
|
||||||
ok(run(app(["openssl", "rsa", "-text", "-noout", @pubin,
|
|
||||||
"-engine", "ossltest", "-inform", "engine",
|
|
||||||
"-in", "ot:$file"])));
|
|
||||||
ok(run(app(["openssl", "rsa", "-text", "-noout", @pubin,
|
|
||||||
"-engine", "ossltest", "-inform", "engine",
|
|
||||||
"-in", "ot:$file_abs"])));
|
|
||||||
ok(run(app(["openssl", "rsa", "-text", "-noout", @pubin,
|
|
||||||
"-in", "${engine_scheme}ossltest:ot:$file"])));
|
|
||||||
ok(run(app(["openssl", "rsa", "-text", "-noout", @pubin,
|
|
||||||
"-in", "${engine_scheme}ossltest:ot:$file_abs"])));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SKIP:
|
SKIP:
|
||||||
{
|
{
|
||||||
init() or die "init failed";
|
init() or die "init failed";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue