jdk/src/share/classes/com/sun/crypto/provider/SunJCE.java
changeset 15010 ec6b49ce42b1
parent 15008 6a494f8ba5b5
child 16909 78a1749a43e2
equal deleted inserted replaced
15009:bcb241432928 15010:ec6b49ce42b1
    89     private static final String OID_PKCS3 = "1.2.840.113549.1.3.1";
    89     private static final String OID_PKCS3 = "1.2.840.113549.1.3.1";
    90 
    90 
    91     /* Are we debugging? -- for developers */
    91     /* Are we debugging? -- for developers */
    92     static final boolean debug = false;
    92     static final boolean debug = false;
    93 
    93 
    94     static final SecureRandom RANDOM = new SecureRandom();
    94     // lazy initialize SecureRandom to avoid potential recursion if Sun
       
    95     // provider has not been installed yet
       
    96     private static class SecureRandomHolder {
       
    97         static final SecureRandom RANDOM = new SecureRandom();
       
    98     }
       
    99     static SecureRandom getRandom() { return SecureRandomHolder.RANDOM; }
    95 
   100 
    96     public SunJCE() {
   101     public SunJCE() {
    97         /* We are the "SunJCE" provider */
   102         /* We are the "SunJCE" provider */
    98         super("SunJCE", 1.7d, info);
   103         super("SunJCE", 1.7d, info);
    99 
   104