summaryrefslogtreecommitdiffstats
path: root/luni
diff options
context:
space:
mode:
authorSergio Giro <sgiro@google.com>2015-06-26 16:02:13 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-06-26 16:02:14 +0000
commitbfae12b711a4de19aa5cb18b8bd53ccfd78e2b59 (patch)
tree5ed56ece69f7ae31009e8a171def411b060cacf3 /luni
parentbfa687ff9d7aa6cef970804cd1d82c042f15ff28 (diff)
parent9f7d5418c438af6fb3b7d74b06e109f1f6a38594 (diff)
downloadlibcore-bfae12b711a4de19aa5cb18b8bd53ccfd78e2b59.zip
libcore-bfae12b711a4de19aa5cb18b8bd53ccfd78e2b59.tar.gz
libcore-bfae12b711a4de19aa5cb18b8bd53ccfd78e2b59.tar.bz2
Merge "libcore: use default SecureRandom in KeyGen DSA tests" into mnc-dev
Diffstat (limited to 'luni')
-rw-r--r--luni/src/test/java/tests/security/interfaces/DSAPrivateKeyTest.java4
-rw-r--r--luni/src/test/java/tests/security/interfaces/DSAPublicKeyTest.java4
2 files changed, 2 insertions, 6 deletions
diff --git a/luni/src/test/java/tests/security/interfaces/DSAPrivateKeyTest.java b/luni/src/test/java/tests/security/interfaces/DSAPrivateKeyTest.java
index 6cebda5..5f4abdd 100644
--- a/luni/src/test/java/tests/security/interfaces/DSAPrivateKeyTest.java
+++ b/luni/src/test/java/tests/security/interfaces/DSAPrivateKeyTest.java
@@ -32,9 +32,7 @@ public class DSAPrivateKeyTest extends TestCase {
*/
public void test_getX() throws Exception {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA");
- keyGen.initialize(new DSAParameterSpec(Util.P, Util.Q, Util.G),
- new SecureRandom(new MySecureRandomSpi(), null) {
- });
+ keyGen.initialize(new DSAParameterSpec(Util.P, Util.Q, Util.G), new SecureRandom());
KeyPair keyPair = keyGen.generateKeyPair();
DSAPrivateKey key = (DSAPrivateKey) keyPair.getPrivate();
assertNotNull("Invalid X value", key.getX());
diff --git a/luni/src/test/java/tests/security/interfaces/DSAPublicKeyTest.java b/luni/src/test/java/tests/security/interfaces/DSAPublicKeyTest.java
index 9fe4910..09e936d 100644
--- a/luni/src/test/java/tests/security/interfaces/DSAPublicKeyTest.java
+++ b/luni/src/test/java/tests/security/interfaces/DSAPublicKeyTest.java
@@ -42,9 +42,7 @@ public class DSAPublicKeyTest extends TestCase {
// Case 1: check with predefined p, q, g, x
keyGen = KeyPairGenerator.getInstance("DSA");
- keyGen.initialize(new DSAParameterSpec(Util.P, Util.Q, Util.G),
- new SecureRandom(new MySecureRandomSpi(), null) {
- });
+ keyGen.initialize(new DSAParameterSpec(Util.P, Util.Q, Util.G), new SecureRandom());
keys = keyGen.generateKeyPair();
priv = (DSAPrivateKey) keys.getPrivate();
publ = (DSAPublicKey) keys.getPublic();