< prev index next >

test/sun/security/provider/SecureRandom/StrongSecureRandom.java

Print this page

        

@@ -23,11 +23,11 @@
 
 /*
  * @test
  * @bug 6425477 8141039
  * @summary Better support for generation of high entropy random numbers
- * @run main StrongSecureRandom
+ * @run main/othervm StrongSecureRandom
  */
 import java.security.*;
 import java.util.*;
 
 /**

@@ -256,10 +256,15 @@
         }
         System.out.println("/");
     }
 
     public static void main(String args[]) throws Exception {
+        // we are going to use "securerandom.source" security property
+        // reset "java.security.egd" system property
+        // since it overrides "securerandom.source" security property
+        System.setProperty("java.security.egd", "");
+
         testDefaultEgd();
         for (String algo : new String[]{
             "SHA1PRNG", "Hash_DRBG", "HMAC_DRBG", "CTR_DRBG"}) {
             testSecureRandomImpl(algo, isDRBG(algo));
         }
< prev index next >