src: seed V8's random number generator at startup
authorBen Noordhuis <info@bnoordhuis.nl>
Fri, 20 Sep 2013 20:01:49 +0000 (22:01 +0200)
committerBen Noordhuis <info@bnoordhuis.nl>
Fri, 20 Sep 2013 20:11:42 +0000 (22:11 +0200)
commit7ac23910c526acc2db448c1093e2bebc7581a2aa
tree75761db4b6353dcbd39e9c579a65b888b1ef8d2b
parent03738183c74d0be43846f96562cb89dce929a953
src: seed V8's random number generator at startup

The default entropy source is /dev/urandom on UNIX platforms, which is
okay but we can do better by seeding it from OpenSSL's entropy pool.

On Windows we can certainly do better; on that platform, V8 seeds the
random number generator using only the current system time.

Fixes #6250.
src/node.cc
src/node_crypto.cc
src/node_crypto.h