summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/bsd-getentropy.c
AgeCommit message (Collapse)Author
2023-08-03Fix RNG seeding for OpenSSL w/out self seeding.Darren Tucker
When sshd is built with an OpenSSL that does not self-seed, it would fail in the preauth privsep process while handling a new connection. Sanity checked by djm@
2023-03-08Extra brackets to prevent warning.Darren Tucker
2022-11-02Always use compat getentropy.Darren Tucker
Have it call native getentropy and fall back as required. Should fix issues of platforms where libc has getentropy but it is not implemented in the kernel. Based on github PR#354 from simsergey.
2022-08-10Rename our getentropy to prevent possible loops.Darren Tucker
Since arc4random seeds from getentropy, and we use OpenSSL for that if enabled, there's the possibility that if we build on a system that does not have getentropy then run on a system that does have it, then OpenSSL could end up calling our getentropy and getting stuck in a loop. Pointed out by deraadt@, ok djm@
2022-08-05Factor out getrnd() and rename to getentropy().Darren Tucker
Factor out the arc4random seeding into its own file and change the interface to match getentropy. Use native getentropy if available. This will make it easier to resync OpenBSD changes to arc4random. Prompted by bz#3467, ok djm@.