Author: jfrederic.clere(a)jboss.com
Date: 2007-12-07 10:05:56 -0500 (Fri, 07 Dec 2007)
New Revision: 373
Modified:
branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java
Log:
Don't load the entropy but sets the file the entropy is collected from.
Modified:
branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
---
branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07
15:04:29 UTC (rev 372)
+++
branches/2.0.x/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07
15:05:56 UTC (rev 373)
@@ -204,17 +204,17 @@
//only once per VM
return;
}
- String methodName = "initialize";
+ String methodName = "randSet";
Class paramTypes[] = new Class[1];
paramTypes[0] = String.class;
Object paramValues[] = new Object[1];
- paramValues[0] = "on".equalsIgnoreCase(SSLEngine)?null:SSLEngine;
+ paramValues[0] = SSLRandomSeed;
Class clazz = Class.forName("org.apache.tomcat.jni.SSL");
Method method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
- methodName = "randLoad";
- paramValues[0] = SSLRandomSeed;
+ methodName = "initialize";
+ paramValues[0] = "on".equalsIgnoreCase(SSLEngine)?null:SSLEngine;
method = clazz.getMethod(methodName, paramTypes);
method.invoke(null, paramValues);
Modified: branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java
===================================================================
--- branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07 15:04:29
UTC (rev 372)
+++ branches/2.0.x/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07 15:05:56
UTC (rev 373)
@@ -227,6 +227,12 @@
public static native int initialize(String engine);
/**
+ * Set source of entropy to use in SSL
+ * @param filename Filename containing random data
+ */
+ public static native boolean randSet(String filename);
+
+ /**
* Add content of the file to the PRNG
* @param filename Filename containing random data.
* If null the default file will be tested.
Show replies by date