From 4b0f77cc1f2f4939c59e92175f6e69394eb3bcef Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Fri, 7 Feb 2025 20:50:19 +0000 Subject: [PATCH] std.crypto.tlcsprng: Fix hardcoded use of defaultRandomSeed() Instead of hardcoding a call to defaultRandomSeed() use the customizable std.options.cryptoRandomSeed() like in the rest of the function. Closes #19943. --- lib/std/crypto/tlcsprng.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/std/crypto/tlcsprng.zig b/lib/std/crypto/tlcsprng.zig index a1d9beb9b5..9e20de1281 100644 --- a/lib/std/crypto/tlcsprng.zig +++ b/lib/std/crypto/tlcsprng.zig @@ -53,7 +53,7 @@ fn tlsCsprngFill(_: *anyopaque, buffer: []u8) void { // std.crypto.random always make an OS syscall, rather than rely on an // application implementation of a CSPRNG. if (std.options.crypto_always_getrandom) { - return defaultRandomSeed(buffer); + return std.options.cryptoRandomSeed(buffer); } if (wipe_mem.len == 0) {