summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/crypto/getentropy_freebsd.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Remove the libcrypto/crypto directorybeck2016-09-031-62/+0
|
* Update the link for the getentropy(2) manual to man.openbsd.org/tb2016-08-071-2/+2
| | | | ok deraadt@
* KNFderaadt2015-08-251-6/+4
|
* Add hooks to override native arc4random_buf on FreeBSD.bcook2014-11-031-0/+64
The FreeBSD-native arc4random_buf implementation falls back to weak sources of entropy if the sysctl fails. Remove these dangerous fallbacks by overriding locally. Unfortunately, pthread_atfork() is also broken on FreeBSD (at least 9 and 10) if a program does not link to -lthr. Callbacks registered with pthread_atfork() simply fail silently. So, it is not always possible to detect a PID wraparound. I wish we could do better. This improves arc4random_buf's safety compared to the native FreeBSD implementation. Tested on FreeBSD 9 and 10.