diff options
author | Matt Caswell <matt@openssl.org> | 2020-12-02 12:56:16 +0000 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-12-11 10:56:22 +0000 |
commit | f2130201f19f74d6d8bbd19e20a6fe33f95d49c6 (patch) | |
tree | 35fc365465c7c521a9ca7b78460b8d3a420095ae /test | |
parent | 81959b26a31bfa807f80d43234db2168f80784c2 (diff) |
Don't load the legacy provider if not available in test_enc_more
If the legacy provider isn't available then we shouldn't attempt to
load or use it.
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13595)
Diffstat (limited to 'test')
-rw-r--r-- | test/recipes/20-test_enc_more.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/recipes/20-test_enc_more.t b/test/recipes/20-test_enc_more.t index 27fc901a16..0bddac00eb 100644 --- a/test/recipes/20-test_enc_more.t +++ b/test/recipes/20-test_enc_more.t @@ -16,6 +16,8 @@ use File::Copy; use File::Compare qw/compare_text/; use File::Basename; use OpenSSL::Test qw/:DEFAULT srctop_file bldtop_dir/; +use OpenSSL::Test::Utils; + setup("test_evp_more"); @@ -26,7 +28,8 @@ my $plaintext = catfile(".", "testdatafile"); my $fail = ""; my $cmd = "openssl"; my $provpath = bldtop_dir("providers"); -my @prov = ("-provider-path", $provpath, "-provider", "default", "-provider", "legacy"); +my @prov = ("-provider-path", $provpath, "-provider", "default"); +push @prov, ("-provider", "legacy") unless disabled("legacy"); my $ciphersstatus = undef; my @ciphers = @@ -34,6 +37,9 @@ my @ciphers = (map { split /\s+/ } run(app([$cmd, "enc", "-list"]), capture => 1, statusvar => \$ciphersstatus))); +@ciphers = grep {!/^-(bf|blowfish|cast|des$|des-cbc|des-cfb|des-ecb|des-ofb + |desx|idea|rc2|rc4|seed)/x} @ciphers + if disabled("legacy"); plan tests => 2 + scalar @ciphers; |