summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/arc4random/arc4random_freebsd.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Tighten behavior of _rs_allocate failure for portable arc4random ↵bcook2016-06-301-1/+2
| | | | | | | | | | implementations. In the event of a failure in _rs_allocate for rsx, we still have a reference to freed memory for rs on return. Not a huge deal since we subsequently abort in _rs_init, but it looks strange on its own. ok deraadt@
* unify files furtherderaadt2015-09-111-4/+4
|
* back in september I did the large abstraction refactoring to allow thesederaadt2015-01-151-1/+2
| | | | other systems to fit into the same mold, so add copyright
* Add hooks to override native arc4random_buf on FreeBSD.bcook2014-11-031-0/+85
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.