diff --git a/src/changes/changes.xml b/src/changes/changes.xml index f565815e8..255eab215 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -94,6 +94,7 @@ StreamInput.StreamInput(InputStream, int) now throws NullPointerException on null input. ChannelOutput.ChannelOutput(WritableByteChannel) now throws NullPointerException on null input. StreamOutput.StreamOutput(OutputStream, int) now throws NullPointerException on null input. + SecureRandom in JavaCryptoRandom is not seeded. Dockerfile: Bump maven to 3.8.8 (previous no longer online) Tests: show details of crypt library actually loaded diff --git a/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java b/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java index 38ed20d15..877132168 100644 --- a/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java +++ b/src/main/java/org/apache/commons/crypto/random/JavaCryptoRandom.java @@ -47,6 +47,8 @@ public JavaCryptoRandom(final Properties properties) { } catch (final NoSuchAlgorithmException e) { tmp = new SecureRandom(); } + // Seed the SecureRandom by calling nextBytes(byte[]) + tmp.nextBytes(new byte[8]); instance = tmp; }