]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
openssl rand command should use the loaded library context
authorDaniel Van Geest <daniel.vangeest@cryptonext-security.com>
Wed, 23 Jul 2025 08:30:57 +0000 (10:30 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 24 Jul 2025 11:26:59 +0000 (13:26 +0200)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <ppzgs1@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28075)

apps/rand.c

index b123a151ea74ce98437528587a756533006f23c0..8ee97581272738f61ade0db2ba40e3424419eaea 100644 (file)
@@ -199,7 +199,7 @@ int rand_main(int argc, char **argv)
         int chunk;
 
         chunk = scaled_num > buflen ? (int)buflen : (int)scaled_num;
-        r = RAND_bytes(buf, chunk);
+        r = RAND_bytes_ex(app_get0_libctx(), buf, chunk, 0);
         if (r <= 0)
             goto end;
         if (format != FORMAT_TEXT) {