Commit 4b0f77cc1f

Linus Groh <mail@linusgroh.de>
2025-02-07 21:50:19
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.
1 parent 84aac8b
Changed files (1)
lib
std
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) {