equal
deleted
inserted
replaced
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 |