31 import java.security.AccessController;
32 import java.security.PrivilegedAction;
33
34 /**
35 * This class provides the default implementation of the GSSManager
36 * interface.
37 */
38 public class GSSManagerImpl extends GSSManager {
39
40 // Undocumented property
41 private static final String USE_NATIVE_PROP =
42 "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 String osname = System.getProperty("os.name");
50 if (osname.startsWith("SunOS") ||
51 osname.startsWith("Linux")) {
52 return new Boolean(System.getProperty
53 (USE_NATIVE_PROP));
54 }
55 return Boolean.FALSE;
56 }
57 });
58
59 }
60
61 private ProviderList list;
62
63 // Used by java SPNEGO impl to make sure native is disabled
64 public GSSManagerImpl(GSSCaller caller, boolean useNative) {
65 list = new ProviderList(caller, useNative);
66 }
67
68 // Used by HTTP/SPNEGO NegotiatorImpl
69 public GSSManagerImpl(GSSCaller caller) {
70 list = new ProviderList(caller, USE_NATIVE);
|
31 import java.security.AccessController;
32 import java.security.PrivilegedAction;
33
34 /**
35 * This class provides the default implementation of the GSSManager
36 * interface.
37 */
38 public class GSSManagerImpl extends GSSManager {
39
40 // Undocumented property
41 private static final String USE_NATIVE_PROP =
42 "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 String osname = System.getProperty("os.name");
50 if (osname.startsWith("SunOS") ||
51 osname.contains("OS X") ||
52 osname.startsWith("Linux")) {
53 return new Boolean(System.getProperty
54 (USE_NATIVE_PROP));
55 }
56 return Boolean.FALSE;
57 }
58 });
59
60 }
61
62 private ProviderList list;
63
64 // Used by java SPNEGO impl to make sure native is disabled
65 public GSSManagerImpl(GSSCaller caller, boolean useNative) {
66 list = new ProviderList(caller, useNative);
67 }
68
69 // Used by HTTP/SPNEGO NegotiatorImpl
70 public GSSManagerImpl(GSSCaller caller) {
71 list = new ProviderList(caller, USE_NATIVE);
|