Author: jfrederic.clere(a)jboss.com
Date: 2007-12-07 10:14:27 -0500 (Fri, 07 Dec 2007)
New Revision: 374
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java
Log:
Don't load the entropy but sets the file the entropy is collected from.
See
http://jira.jboss.com/jira/browse/JBNATIVE-51
Modified:
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07
15:05:56 UTC (rev 373)
+++
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/catalina/core/AprLifecycleListener.java 2007-12-07
15:14:27 UTC (rev 374)
@@ -205,17 +205,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/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java
===================================================================
---
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07
15:05:56 UTC (rev 373)
+++
branches/JBOSSWEB_2_0_0_GA_CP/src/share/classes/org/apache/tomcat/jni/SSL.java 2007-12-07
15:14:27 UTC (rev 374)
@@ -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.