|
a47a4b7e
|
2010-04-23T16:08:09
|
|
Fix a couple of bugs in the BSD sysctl arc4seed logic
Of course, FreeBSD has its own arc4random() implementation, so this should
never actually be needed. Still, it's good to paint the underside of the
wagon.
|
|
71fc3eb0
|
2010-03-04T01:13:51
|
|
Seed the RNG using sysctl() as well as /dev/urandom
William Ahern points out that if the user has chrooted, they might not
have a working /dev/urandom. Linux and many of the BSDs, however,
define a sysctl interface to their kernel random number generators.
This patch takes a belt-and-suspenders approach and tries to do use the
sysctl _and_ the /dev/urandom approach if both are present. When using
the sysctl approach, it tries to bulletproof itself by checking to make
sure that the buffers are actually set by the sysctl calls.
|
|
98edb891
|
2010-02-25T17:14:41
|
|
Fix arc4random compilation on MSVC.
|
|
ff2a134d
|
2010-02-18T00:54:44
|
|
Fix getpid() usage on Windows
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.
|
|
4ec8fea6
|
2010-02-13T00:11:44
|
|
Make RNG work when we have arc4random() but not arc4random_buf()
|
|
d4de062e
|
2010-02-10T17:19:18
|
|
Add an arc4random implementation for use by evdns
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.
|