public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
private static boolean hasSpnegoSupport(GSSManager manager) throws GSSException { org.ietf.jgss.Oid spnego = new org.ietf.jgss.Oid("1.3.6.1.5.5.2"); org.ietf.jgss.Oid[] mechs = manager.getMechs(); for (Oid mech : mechs) { if (mech.equals(spnego)) { return true; } } return false; }
return GSSCredentialSecurityFactory.SPNEGO; Oid[] mechanisms = gssManager.getMechs(); if (mechanisms == null) { throw new GSSException(GSSException.BAD_MECH);
final String[] supportedMechanisms; try { supportedMechanisms = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { throw saslGs2.mechGettingSupportedMechanismsFailed(e).toSaslException();
final String[] supportedMechs; try { supportedMechs = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { throw saslGs2.mechGettingSupportedMechanismsFailed(e).toSaslException();
public static synchronized boolean isSupported() { if (ourIsNegotiateSupported == null) { try { Oid spnegoOid = new Oid("1.3.6.1.5.5.2"); ourIsNegotiateSupported = Boolean.valueOf(Arrays.asList(GSSManager.getInstance().getMechs()).contains(spnegoOid)); } catch (GSSException gsse) { ourIsNegotiateSupported = Boolean.FALSE; } } return ourIsNegotiateSupported.booleanValue(); }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public String[] getMechanismNames(final Map<String, ?> props) { String[] names; try { names = Gs2Util.getSupportedSaslNamesForMechanisms(gssManager.getMechs()); } catch (GSSException e) { return WildFlySasl.NO_NAMES; } if (props != null && !"true".equals(props.get(WildFlySasl.MECHANISM_QUERY_ALL)) && "true".equals(props.get(WildFlySasl.CHANNEL_BINDING_REQUIRED))) { return Gs2Util.getPlusMechanisms(names); } else { return names; } } }
public static synchronized boolean isSupported() { if (ourIsNegotiateSupported == null) { Oid spnegoOid = getDefaultOID(); Oid[] supportedOids = GSSManager.getInstance().getMechs(); for (int i = 0; i < supportedOids.length; i++) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, "NEGOTIATE: supported OID: " + supportedOids[i]); } ourIsNegotiateSupported = Boolean.valueOf(Arrays.asList(GSSManager.getInstance().getMechs()).contains(spnegoOid)); } return ourIsNegotiateSupported.booleanValue(); }
public static synchronized boolean isSupported() { if (ourIsNegotiateSupported == null) { Oid spnegoOid = getDefaultOID(); Oid[] supportedOids = GSSManager.getInstance().getMechs(); for (int i = 0; i < supportedOids.length; i++) { SVNDebugLog.getDefaultLog().logFine(SVNLogType.NETWORK, "NEGOTIATE: supported OID: " + supportedOids[i]); } ourIsNegotiateSupported = Boolean.valueOf(Arrays.asList(GSSManager.getInstance().getMechs()).contains(spnegoOid)); } return ourIsNegotiateSupported.booleanValue(); }
/** * Retrieves an immutable collection of the supported mechanisms. * * @return the supported mechanisms */ @NonNull public static Collection<Oid> getSupportedMechanisms() { synchronized (LOCK) { if (supportedMechanisms == null) { GSSManager manager = GSSManager.getInstance(); Oid[] mechs = manager.getMechs(); Map<Oid, Boolean> mechanisms = new LinkedHashMap<>(); if (mechs != null) { for (Oid oid : mechs) { mechanisms.put(oid, Boolean.FALSE); } } supportedMechanisms = mechanisms; } return Collections.unmodifiableSet(supportedMechanisms.keySet()); } }
return GSSCredentialSecurityFactory.SPNEGO; Oid[] mechanisms = gssManager.getMechs(); if (mechanisms == null) { throw new GSSException(GSSException.BAD_MECH);
return GSSCredentialSecurityFactory.SPNEGO; Oid[] mechanisms = gssManager.getMechs(); if (mechanisms == null) { throw new GSSException(GSSException.BAD_MECH);
static byte[] getGSSToken(String systemName, Object gssCredential) throws Exception { GSSManager manager = (GSSManager)AS400.getGSSManager(); if(manager == null) { manager = GSSManager.getInstance(); } else { if (Trace.traceOn_) Trace.log(Trace.DIAGNOSTIC, "Using custom GSS manager: '" + manager + "'"); } if (Trace.isTraceOn()) { Oid[] mechs = manager.getMechs(); Trace.log(Trace.DIAGNOSTIC, "GSS number of mechs available: ", mechs.length); for (int i = 0; i < mechs.length; ++i) Trace.log(Trace.DIAGNOSTIC, mechs[i].toString()); } Oid krb5Mech = new Oid("1.2.840.113554.1.2.2"); GSSName serverName = manager.createName("krbsvr400@" + systemName, GSSName.NT_HOSTBASED_SERVICE, krb5Mech); GSSCredential credential = (GSSCredential)gssCredential; GSSContext context = manager.createContext(serverName, krb5Mech, credential, GSSCredential.DEFAULT_LIFETIME); return context.initSecContext(new byte[0], 0, 0); } }
Oid[] mechs = manager.getMechs(); Trace.log(Trace.DIAGNOSTIC, "GSS number of mechs available: ", mechs.length); for (int i = 0; i < mechs.length; ++i) Trace.log(Trace.DIAGNOSTIC, mechs[i].toString());