From 3baa08a3bbc674726d501eebba09fdc2cb3cc76e Mon Sep 17 00:00:00 2001 From: zzz <zzz@mail.i2p> Date: Sat, 9 Jul 2016 21:07:31 +0000 Subject: [PATCH] Utils: Improve random seed initialization Fallback to Random rather than try SecureRandom twice Fetch from SecureRandom incrementally Remove log warning correction, this is just a simple javadoc fix, original changelog was a dup --- core/java/src/net/i2p/client/I2PClient.java | 6 ++++++ core/java/src/net/i2p/client/impl/I2PClientImpl.java | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/core/java/src/net/i2p/client/I2PClient.java b/core/java/src/net/i2p/client/I2PClient.java index 273ba7e2d9..3942aeb6e7 100644 --- a/core/java/src/net/i2p/client/I2PClient.java +++ b/core/java/src/net/i2p/client/I2PClient.java @@ -84,6 +84,8 @@ public interface I2PClient { /** Create a new destination with the default certificate creation properties and store * it, along with the private encryption and signing keys at the specified location * + * Caller must close stream. + * * @param destKeyStream create a new destination and write out the object to the given stream, * formatted as Destination, PrivateKey, and SigningPrivateKey * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} @@ -97,6 +99,8 @@ public interface I2PClient { * This is not bound to the I2PClient, you must supply the data back again * in createSession(). * + * Caller must close stream. + * * @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey, * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * @since 0.9.12 @@ -106,6 +110,8 @@ public interface I2PClient { /** Create a new destination with the given certificate and store it, along with the private * encryption and signing keys at the specified location * + * Caller must close stream. + * * @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey, * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * @param cert certificate to tie to the destination diff --git a/core/java/src/net/i2p/client/impl/I2PClientImpl.java b/core/java/src/net/i2p/client/impl/I2PClientImpl.java index 0bda34daa4..dfd957a986 100644 --- a/core/java/src/net/i2p/client/impl/I2PClientImpl.java +++ b/core/java/src/net/i2p/client/impl/I2PClientImpl.java @@ -46,6 +46,8 @@ public class I2PClientImpl implements I2PClient { * This is not bound to the I2PClient, you must supply the data back again * in createSession(). * + * Caller must close stream. + * * @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey, * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} */ @@ -59,6 +61,8 @@ public class I2PClientImpl implements I2PClient { * This is not bound to the I2PClient, you must supply the data back again * in createSession(). * + * Caller must close stream. + * * @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey, * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} * @since 0.9.12 @@ -82,6 +86,8 @@ public class I2PClientImpl implements I2PClient { * The padding if any will be randomized. The extra key data if any will be set in the * key cert. * + * Caller must close stream. + * * @param destKeyStream location to write out the destination, PrivateKey, and SigningPrivateKey, * format is specified in {@link net.i2p.data.PrivateKeyFile PrivateKeyFile} */ -- GitLab