Skip to content

Commit 4b0f77c

Browse files
linusgandrewrk
authored andcommitted
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 commit 4b0f77c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/crypto/tlcsprng.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ fn tlsCsprngFill(_: *anyopaque, buffer: []u8) void {
5353
// std.crypto.random always make an OS syscall, rather than rely on an
5454
// application implementation of a CSPRNG.
5555
if (std.options.crypto_always_getrandom) {
56-
return defaultRandomSeed(buffer);
56+
return std.options.cryptoRandomSeed(buffer);
5757
}
5858

5959
if (wipe_mem.len == 0) {

0 commit comments

Comments
 (0)