You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cr...@apache.org on 2003/06/19 09:27:47 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/flow ContinuationsManagerImpl.java
crossley 2003/06/19 00:27:47
Modified: src/java/org/apache/cocoon/components/flow
ContinuationsManagerImpl.java
Log:
The SHA1PRNG algorithm is not available on IBM's SDK.
Instead use IBMSecureRandom.
Submitted by: Michael Enke <michael.enke.AT.wincor-nixdorf.com>
Revision Changes Path
1.6 +8 -2 cocoon-2.1/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
Index: ContinuationsManagerImpl.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ContinuationsManagerImpl.java 20 Mar 2003 02:46:32 -0000 1.5
+++ ContinuationsManagerImpl.java 19 Jun 2003 07:27:47 -0000 1.6
@@ -116,7 +116,13 @@
public ContinuationsManagerImpl() throws Exception {
- random = SecureRandom.getInstance("SHA1PRNG");
+ try {
+ random = SecureRandom.getInstance("SHA1PRNG");
+ }
+ catch(java.security.NoSuchAlgorithmException nsae) {
+ // maybe we are on IBM's SDK
+ random = SecureRandom.getInstance("IBMSecureRandom");
+ }
random.setSeed(System.currentTimeMillis());
bytes = new byte[CONTINUATION_ID_LENGTH];
}