diff options
author | Sergio Giro <sgiro@google.com> | 2015-06-26 16:02:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-06-26 16:02:14 +0000 |
commit | bfae12b711a4de19aa5cb18b8bd53ccfd78e2b59 (patch) | |
tree | 5ed56ece69f7ae31009e8a171def411b060cacf3 /luni | |
parent | bfa687ff9d7aa6cef970804cd1d82c042f15ff28 (diff) | |
parent | 9f7d5418c438af6fb3b7d74b06e109f1f6a38594 (diff) | |
download | libcore-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.java | 4 | ||||
-rw-r--r-- | luni/src/test/java/tests/security/interfaces/DSAPublicKeyTest.java | 4 |
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(); |