]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
replace ossltest engine in test_dgst
authorNeil Horman <nhorman@openssl.org>
Thu, 4 Sep 2025 17:45:22 +0000 (13:45 -0400)
committerPauli <paul.dale@oracle.com>
Wed, 17 Sep 2025 00:21:46 +0000 (10:21 +1000)
Use the new ossltest provider rather than the ossltest engine

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)

test/recipes/20-test_dgst.t

index cf111a63e8e41ad539b80290c6f7857cded8dd34..250821c9a7f0bf3fefb1178eac48fee8ee59f7b1 100644 (file)
@@ -14,6 +14,7 @@ use File::Spec;
 use File::Basename;
 use OpenSSL::Test qw/:DEFAULT with srctop_file data_file bldtop_dir/;
 use OpenSSL::Test::Utils;
+use Cwd qw(abs_path);
 
 setup("test_dgst");
 
@@ -166,17 +167,18 @@ SKIP: {
 }
 
 SKIP: {
-    skip "dgst with engine is not supported by this OpenSSL build", 1
-        if disabled("engine") || disabled("dynamic-engine");
+    skip "dgst with provider is not supported by this OpenSSL build", 1
+        if disabled("module");
 
-    subtest "SHA1 generation by engine with `dgst` CLI" => sub {
+    subtest "SHA1 generation by provider with `dgst` CLI" => sub {
         plan tests => 1;
 
+        $ENV{OPENSSL_MODULES} = abs_path(bldtop_dir("test"));
         my $testdata = srctop_file('test', 'data.bin');
-        # intentionally using -engine twice, please do not remove the duplicate line
         my @macdata = run(app(['openssl', 'dgst', '-sha1',
-                               '-engine', "ossltest",
-                               '-engine', "ossltest",
+                               '-provider', "p_ossltest",
+                               '-provider', "default",
+                               '-propquery', '?provider=p_ossltest',
                                $testdata]), capture => 1);
         chomp(@macdata);
         my $expected = qr/SHA1\(\Q$testdata\E\)= 000102030405060708090a0b0c0d0e0f10111213/;