--- a/jdk/test/java/math/BigInteger/ModPow65537.java Wed Apr 29 11:03:56 2015 -0700
+++ b/jdk/test/java/math/BigInteger/ModPow65537.java Wed Apr 29 16:34:49 2015 -0700
@@ -23,8 +23,10 @@
/*
* @test
- * @library ..
- * @bug 4891312 8074460
+ * @library /lib/testlibrary/
+ * @build jdk.testlibrary.*
+ * @run main ModPow65537
+ * @bug 4891312 8074460 8078672
* @summary verify that modPow() not broken by the special case for 65537 (use -Dseed=X to set PRNG seed)
* @author Andreas Sterbenz
* @key randomness
@@ -34,6 +36,7 @@
import java.security.*;
import java.security.spec.*;
+import java.util.Random;
public class ModPow65537 {
@@ -79,9 +82,8 @@
private static void testSigning(KeyPair kp) throws Exception {
System.out.println(kp.getPublic());
byte[] data = new byte[1024];
- RandomSeed rndSeed = new RandomSeed(false);
- System.out.println("Random number generator seed = " + rndSeed.getSeed());
- rndSeed.getRandom().nextBytes(data);
+ Random random = RandomFactory.getRandom();
+ random.nextBytes(data);
Signature sig = Signature.getInstance("SHA1withRSA", "SunRsaSign");
sig.initSign(kp.getPrivate());