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.
This commit is contained in:
Linus Groh 2025-02-07 20:50:19 +00:00 committed by Andrew Kelley
parent 84aac8b6c7
commit 4b0f77cc1f

View File

@ -53,7 +53,7 @@ fn tlsCsprngFill(_: *anyopaque, buffer: []u8) void {
// std.crypto.random always make an OS syscall, rather than rely on an // std.crypto.random always make an OS syscall, rather than rely on an
// application implementation of a CSPRNG. // application implementation of a CSPRNG.
if (std.options.crypto_always_getrandom) { if (std.options.crypto_always_getrandom) {
return defaultRandomSeed(buffer); return std.options.cryptoRandomSeed(buffer);
} }
if (wipe_mem.len == 0) { if (wipe_mem.len == 0) {