From a4f75d7b321ca09b2125f4e6a60026a3da76ffe8 Mon Sep 17 00:00:00 2001 From: zzz Date: Fri, 22 Jan 2016 16:04:43 +0000 Subject: [PATCH] Random: Don't bother trying to seed from /dev/urandom on Windows --- core/java/src/net/i2p/util/RandomSource.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/java/src/net/i2p/util/RandomSource.java b/core/java/src/net/i2p/util/RandomSource.java index 9c522ddd0..b92295e63 100644 --- a/core/java/src/net/i2p/util/RandomSource.java +++ b/core/java/src/net/i2p/util/RandomSource.java @@ -201,7 +201,8 @@ public class RandomSource extends SecureRandom implements EntropyHarvester { } catch (InterruptedException ie) {} // why urandom? because /dev/random blocks - ok = seedFromFile(new File("/dev/urandom"), buf) || ok; + if (!SystemVersion.isWindows()) + ok = seedFromFile(new File("/dev/urandom"), buf) || ok; // we merge (XOR) in the data from /dev/urandom with our own seedfile File localFile = new File(_context.getConfigDir(), SEEDFILE); ok = seedFromFile(localFile, buf) || ok;