summaryrefslogtreecommitdiff
path: root/arc4random.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix arc4random compilation on MSVC.Nick Mathewson2010-02-251-3/+5
|
* Fix getpid() usage on WindowsNick Mathewson2010-02-181-0/+5
| | | | | | | | | | On Windows, getpid() is _getpid(), and requires that we first include <process.h>. arc4random.c previously didn't know that. Actually, I question whether arc4random needs to do its getpid() tricks on Windows. They exist only so that we remember to re-seed the ARC4 cipher whenever we fork... but Windows has no fork(), so I think we're in the clear.
* Make RNG work when we have arc4random() but not arc4random_buf()Nick Mathewson2010-02-131-3/+7
|
* Add an arc4random implementation for use by evdnsNick Mathewson2010-02-111-0/+358
Previously, evdns was at the mercy of the user for providing a good entropy source; without one, it would be vulnerable to various active attacks. This patch adds a port of OpenBSD's arc4random() calls to Libevent [port by Chris Davis], and wraps it up a little bit so we can use it more safely.