jdk/src/java.base/share/classes/sun/security/ssl/JsseJce.java
changeset 30905 bba6fefdd660
parent 25859 3317bb8137f4
child 33991 619bfc4d582d
child 32649 2ee9017c7597
equal deleted inserted replaced
30904:ec0224270f90 30905:bba6fefdd660
    62 
    62 
    63     // Flag indicating whether Kerberos crypto is available.
    63     // Flag indicating whether Kerberos crypto is available.
    64     // If true, then all the Kerberos-based crypto we need is available.
    64     // If true, then all the Kerberos-based crypto we need is available.
    65     private final static boolean kerberosAvailable;
    65     private final static boolean kerberosAvailable;
    66     static {
    66     static {
    67         boolean temp;
    67         ClientKeyExchangeService p =
    68         try {
    68                 ClientKeyExchangeService.find("KRB5");
    69             AccessController.doPrivileged(
    69         kerberosAvailable = (p != null);
    70                 new PrivilegedExceptionAction<Void>() {
       
    71                     @Override
       
    72                     public Void run() throws Exception {
       
    73                         // Test for Kerberos using the bootstrap class loader
       
    74                         Class.forName("sun.security.krb5.PrincipalName", true,
       
    75                                 null);
       
    76                         return null;
       
    77                     }
       
    78                 });
       
    79             temp = true;
       
    80 
       
    81         } catch (Exception e) {
       
    82             temp = false;
       
    83         }
       
    84         kerberosAvailable = temp;
       
    85     }
    70     }
    86 
    71 
    87     static {
    72     static {
    88         // force FIPS flag initialization
    73         // force FIPS flag initialization
    89         // Because isFIPS() is synchronized and cryptoProvider is not modified
    74         // Because isFIPS() is synchronized and cryptoProvider is not modified