24 */ |
24 */ |
25 |
25 |
26 package sun.security.jgss; |
26 package sun.security.jgss; |
27 |
27 |
28 import org.ietf.jgss.*; |
28 import org.ietf.jgss.*; |
|
29 import sun.security.action.GetBooleanAction; |
29 import sun.security.jgss.spi.*; |
30 import sun.security.jgss.spi.*; |
30 import java.security.Provider; |
31 import java.security.Provider; |
31 import java.security.AccessController; |
|
32 import java.security.PrivilegedAction; |
|
33 |
32 |
34 /** |
33 /** |
35 * This class provides the default implementation of the GSSManager |
34 * This class provides the default implementation of the GSSManager |
36 * interface. |
35 * interface. |
37 */ |
36 */ |
38 public class GSSManagerImpl extends GSSManager { |
37 public class GSSManagerImpl extends GSSManager { |
39 |
38 |
40 // Undocumented property |
39 // Undocumented property |
41 private static final String USE_NATIVE_PROP = |
40 private static final Boolean USE_NATIVE = GetBooleanAction |
42 "sun.security.jgss.native"; |
41 .privilegedGetProperty("sun.security.jgss.native"); |
43 private static final Boolean USE_NATIVE; |
|
44 |
|
45 static { |
|
46 USE_NATIVE = |
|
47 AccessController.doPrivileged(new PrivilegedAction<Boolean>() { |
|
48 public Boolean run() { |
|
49 return Boolean.valueOf(System.getProperty |
|
50 (USE_NATIVE_PROP)); |
|
51 } |
|
52 }); |
|
53 |
|
54 } |
|
55 |
42 |
56 private ProviderList list; |
43 private ProviderList list; |
57 |
44 |
58 // Used by java SPNEGO impl to make sure native is disabled |
45 // Used by java SPNEGO impl to make sure native is disabled |
59 public GSSManagerImpl(GSSCaller caller, boolean useNative) { |
46 public GSSManagerImpl(GSSCaller caller, boolean useNative) { |