commit 4b0f77cc1f2f4939c59e92175f6e69394eb3bcef (tree)
parent 84aac8b6c7721d53a93e636e803e867933ae6e99
Author: Linus Groh <mail@linusgroh.de>
Date: Fri, 7 Feb 2025 20:50:19 +0000
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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) {