mturk 2005/05/29 23:18:06
Modified: jni/java/org/apache/tomcat/jni SSL.java
Log:
Add random seed functions for PRNG initialization.
Revision Changes Path
1.4 +26 -2
jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java
Index: SSL.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-connectors/jni/java/org/apache/tomcat/jni/SSL.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SSL.java 20 May 2005 09:25:39 -0000 1.3
+++ SSL.java 30 May 2005 06:18:06 -0000 1.4
@@ -88,7 +88,6 @@
public static final int SSL_VERIFY_CLIENT_ONCE = 4;
public static final int SSL_VERIFY_PEER_STRICT =
(SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT);
-
/* Return OpenSSL version number */
public static native int version();
@@ -106,5 +105,30 @@
*/
public static native int initialize(String engine);
+ /**
+ * Add content of the file to the PRNG
+ * @param filename Filename containing random data.
+ * If null the default file will be tested.
+ * The seed file is $RANDFILE if that environment variable is
+ * set, $HOME/.rnd otherwise.
+ */
+ public static native boolean randLoad(String filename);
+
+ /**
+ * Writes a number of random bytes (currently 1024) to
+ * file @filename which can be used to initialize the PRNG by calling
+ * randLoad in a later session.
+ * @param filename Filename to save the data
+ */
+ public static native boolean randSave(String filename);
+
+ /**
+ * Creates random data to filename
+ * @param filename Filename to save the data
+ * @len The length of random sequence in bytes
+ * @base64 Output the data in Base64 encoded format
+ */
+ public static native boolean randMake(String filename, int length,
+ boolean base64);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]