Don't load the entropy but sets the file the entropy is collected from.
authorjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 7 Dec 2007 15:00:01 +0000 (15:00 +0000)
committerjfclere <jfclere@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 7 Dec 2007 15:00:01 +0000 (15:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@602114 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/AprLifecycleListener.java
java/org/apache/tomcat/jni/SSL.java

index d05c21f..425a727 100644 (file)
@@ -205,17 +205,18 @@ public class AprLifecycleListener
              //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);
  
index daf8d29..d640ca6 100644 (file)
@@ -227,6 +227,12 @@ public final class SSL {
     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.