Commit 4abebf4e85 for openssl.org

commit 4abebf4e85b356a42327d3b6e074619ee00c0063
Author: Neil Horman <nhorman@openssl.org>
Date:   Thu Sep 4 13:44:30 2025 -0400

    Convert test_rand to use our new p_ossltest provider

    Replace ossltest engine with ossltest provider in test_rand

    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)

diff --git a/test/recipes/05-test_rand.t b/test/recipes/05-test_rand.t
index 7462630127..3a1bac8726 100644
--- a/test/recipes/05-test_rand.t
+++ b/test/recipes/05-test_rand.t
@@ -10,7 +10,8 @@ use strict;
 use warnings;
 use OpenSSL::Test;
 use OpenSSL::Test::Utils;
-use OpenSSL::Test qw/:DEFAULT srctop_file/;
+use OpenSSL::Test qw/:DEFAULT srctop_file bldtop_dir/;
+use Cwd qw(abs_path);

 plan tests => 6;
 setup("test_rand");
@@ -34,11 +35,12 @@ SKIP: {
     my @randdata;
     my $expected = '0102030405060708090a0b0c0d0e0f10';

-    @randdata = run(app(['openssl', 'rand', '-engine', 'ossltest', '-hex', '16' ]),
+    $ENV{OPENSSL_MODULES} = abs_path(bldtop_dir("test"));
+    @randdata = run(app(['openssl', 'rand', '-provider', 'p_ossltest', '-provider', 'default', '-propquery', '?provider=p_ossltest', '-hex', '16' ]),
                     capture => 1, statusvar => \$success);
     chomp(@randdata);
     ok($success && $randdata[0] eq $expected,
-       "rand with ossltest: Check rand output is as expected");
+       "rand with ossltest provider: Check rand output is as expected");

     @randdata = run(app(['openssl', 'rand', '-hex', '2K' ]),
                     capture => 1, statusvar => \$success);