Author: remy.maucherat(a)jboss.com
Date: 2010-11-30 09:46:02 -0500 (Tue, 30 Nov 2010)
New Revision: 1593
Modified:
trunk/java/org/apache/catalina/core/StandardService.java
Log:
- Supposedly self seeding is good enough.
Modified: trunk/java/org/apache/catalina/core/StandardService.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardService.java 2010-11-25 17:00:03 UTC (rev
1592)
+++ trunk/java/org/apache/catalina/core/StandardService.java 2010-11-30 14:46:02 UTC (rev
1593)
@@ -309,8 +309,6 @@
}
if (apr) {
setEntropy(new String(Base64.encode(result)));
- } else {
- setEntropy(this.toString());
}
}
return (this.entropy);
@@ -763,7 +761,12 @@
}
// Construct and seed a new random number generator
- random = new SecureRandom(getEntropy().getBytes());
+ String entropy = getEntropy();
+ if (entropy != null) {
+ random = new SecureRandom(getEntropy().getBytes());
+ } else {
+ random = new SecureRandom();
+ }
}
public void destroy() throws LifecycleException {
Show replies by date