summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/arc4random/arc4random_osx.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
* munmap correct object in (extremely unlikely, and effectively terminal)deraadt2014-08-131-2/+2
| | | | | case of failing to map the 2nd object. found by Paul Maurers
* Move more OS-specific functionality to arc4random.h headers.bcook2014-07-201-1/+10
| | | | | | | | Move <sys/mman.h> and raise(SIGKILL) calls to OS-specific headers. On OpenBSD, move thread_private.h as well to arc4random.h. On Windows, use TerminateProcess on getentropy failure. ok deraadt@
* Move _ARC4_ATFORK handlers from thread_private.h in portable.bcook2014-07-191-1/+3
|
* move _ARC4_LOCK/UNLOCK primitives from thread_private into OS-specific modulesbcook2014-07-191-1/+7
|
* fixup typosbcook2014-07-191-18/+18
|
* Change _rs_allocate so it can combine the two regions (rs and rsx)deraadt2014-07-191-15/+14
| | | | | | | | | | into one if a system has an awesome getentropy(). In that case it is valid to totally throw away the rsx state in the child. If the getentropy() is not very good and has a lazy reseed operation, this combining is a bad idea, and the reseed should probably continue to use the "something old, something new" mix. _rs_allocate() can accomodate either method, but not on the fly. ok matthew
* Cleanup portable arc4random fork detection code:matthew2014-07-181-11/+8
| | | | | | | | | | | | | | 1. Use "len" parameter instead of sizeof(*rs). 2. Simplify the atfork handler to be strictly async signal safe by simply writing to a global volatile sig_atomic_t object, and then checking for this in _rs_forkdetect(). (Idea from discussions with Szabolcs Nagy and Rich Felker.) 3. Use memset(rs, 0, sizeof(*rs)) to match OpenBSD's MAP_INHERIT_ZERO fork semantics to avoid any skew in behavior across platforms. ok deraadt
* Seperate arc4random's os-dependent parts into static inline functions,deraadt2014-07-181-0/+66
making it much easier for libressl -portable to fill in the gaps. ok bcook beck