summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/bsd-getentropy.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Fix RNG seeding for OpenSSL w/out self seeding.Darren Tucker2023-08-031-1/+5
| | | | | | 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@
* Extra brackets to prevent warning.Darren Tucker2023-03-081-1/+1
|
* Always use compat getentropy.Darren Tucker2022-11-021-3/+4
| | | | | | 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.
* Rename our getentropy to prevent possible loops.Darren Tucker2022-08-101-1/+1
| | | | | | | | 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@
* Factor out getrnd() and rename to getentropy().Darren Tucker2022-08-051-0/+82
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@.