From: Neil Horman Date: Thu, 4 Sep 2025 17:44:30 +0000 (-0400) Subject: Convert test_rand to use our new p_ossltest provider X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4abebf4e85b356a42327d3b6e074619ee00c0063;p=thirdparty%2Fopenssl.git Convert test_rand to use our new p_ossltest provider Replace ossltest engine with ossltest provider in test_rand Reviewed-by: Matt Caswell Reviewed-by: Shane Lontis Reviewed-by: Paul Dale (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 74626301272..3a1bac87260 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);