summaryrefslogtreecommitdiff
path: root/BKUWebStart/src/main/java
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-01-27 15:26:49 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-01-27 15:26:49 +0000
commit111d7e2bb3c4fbfed8b448633d3e8c1c6e5661db (patch)
tree869522926767e1ec6697cb18212dfa77e1e397cc /BKUWebStart/src/main/java
parentf3d213f55047482124eb2488ca49d56b050d1071 (diff)
downloadmocca-111d7e2bb3c4fbfed8b448633d3e8c1c6e5661db.tar.gz
mocca-111d7e2bb3c4fbfed8b448633d3e8c1c6e5661db.tar.bz2
mocca-111d7e2bb3c4fbfed8b448633d3e8c1c6e5661db.zip
Replace (important) instances of Random with SecureRandom
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1023 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUWebStart/src/main/java')
-rw-r--r--BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/TLSServerCA.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/TLSServerCA.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/TLSServerCA.java
index 7744b166..bb81c94b 100644
--- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/TLSServerCA.java
+++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/TLSServerCA.java
@@ -44,10 +44,10 @@ import java.security.GeneralSecurityException;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.KeyStore;
+import java.security.SecureRandom;
import java.security.NoSuchAlgorithmException;
import java.util.Calendar;
import java.util.GregorianCalendar;
-import java.util.Random;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -80,7 +80,7 @@ public class TLSServerCA {
caKeyPair = generateKeyPair();
caCert = new X509Certificate();
- caCert.setSerialNumber(new BigInteger(20, new Random()));
+ caCert.setSerialNumber(new BigInteger(20, new SecureRandom()));
caCert.setSubjectDN(subject);
caCert.setPublicKey(caKeyPair.getPublic());
caCert.setIssuerDN(subject);
@@ -116,7 +116,7 @@ public class TLSServerCA {
serverKeyPair = generateKeyPair();
serverCert = new X509Certificate();
- serverCert.setSerialNumber(new BigInteger(20, new Random()));
+ serverCert.setSerialNumber(new BigInteger(20, new SecureRandom()));
serverCert.setSubjectDN(subject);
serverCert.setPublicKey(serverKeyPair.getPublic());
serverCert.setIssuerDN(caCert.getSubjectDN());