]> git.ipfire.org Git - thirdparty/curl.git/commit
rand: use arc4random as fallback when available
authorHarry Sintonen <sintonen@iki.fi>
Sat, 4 Mar 2023 07:02:14 +0000 (09:02 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Mar 2023 10:21:38 +0000 (11:21 +0100)
commit755ddbe901cd0c921fbc3ac5b3775c0dc683bc73
tree80d8f2eb121f80c86759d966c9d973b285204560
parent1dd929674e09093ca6abb069cd84d6b99d350656
rand: use arc4random as fallback when available

Normally curl uses cryptographically strong random provided by the
selected SSL backend. If compiled without SSL support, a naive built-in
function was used instead.

Generally this was okay, but it will result in some downsides for non-
SSL builds, such as predictable temporary file names.

This change ensures that arc4random will be used instead, if available.

Closes #10672
configure.ac
lib/rand.c