Source:
public SaslServer createSaslServer(final String mechanism, final String protocol, final String serverName, final Map<String, ?> props, final CallbackHandler cbh) throws SaslException { Signature signature; boolean mutual = false; final Object serverAuthValue = props.get(Sasl.SERVER_AUTH); final boolean serverAuth = serverAuthValue instanceof String ? "true".equals((String) serverAuthValue) : false; switch (mechanism) { case Entity.ENTITY_MUTUAL_RSA_SHA1_ENC: mutual = true; case Entity.ENTITY_UNILATERAL_RSA_SHA1_ENC: if (serverAuth != mutual) return null; try { signature = Signature.getInstance(SHA1_WITH_RSA); } catch (NoSuchAlgorithmException e) { return null; } break; case Entity.ENTITY_MUTUAL_DSA_SHA1: mutual = true; case Entity.ENTITY_UNILATERAL_DSA_SHA1: if (serverAuth != mutual) return null; try { signature = Signature.getInstance(SHA1_WITH_DSA); } catch (NoSuchAlgorithmException e) { return null; } break; case Entity.ENTITY_MUTUAL_ECDSA_SHA1: mutual = true; case Entity.ENTITY_UNILATERAL_ECDSA_SHA1: if (serverAuth != mutual) return null; try { signature = Signature.getInstance(SHA1_WITH_ECDSA); } catch (NoSuchAlgorithmException e) { return null; } break; default: { return null; } } final Object rngNameValue = props.get(WildFlySasl.SECURE_RNG); final String rngName = rngNameValue instanceof String ? (String) rngNameValue : null; SecureRandom secureRandom = null; if (rngName != null) { try { secureRandom = SecureRandom.getInstance(rngName); } catch (NoSuchAlgorithmException ignored) { } } final EntitySaslServer server = new EntitySaslServer(mechanism, protocol, serverName, cbh, props, signature, secureRandom); server.init(); return server; }

Target:
public SaslServer createSaslServer(final String mechanism, final String protocol, final String serverName, final Map<String, ?> props, final CallbackHandler cbh) throws SaslException { Signature signature; boolean mutual = false; final boolean serverAuth = Boolean.parseBoolean(String.valueOf(props.get(Sasl.SERVER_AUTH))); switch (mechanism) { case Entity.ENTITY_MUTUAL_RSA_SHA1_ENC: mutual = true; case Entity.ENTITY_UNILATERAL_RSA_SHA1_ENC: if (serverAuth && ! mutual) return null; try { signature = Signature.getInstance(SHA1_WITH_RSA); } catch (NoSuchAlgorithmException e) { return null; } break; case Entity.ENTITY_MUTUAL_DSA_SHA1: mutual = true; case Entity.ENTITY_UNILATERAL_DSA_SHA1: if (serverAuth && ! mutual) return null; try { signature = Signature.getInstance(SHA1_WITH_DSA); } catch (NoSuchAlgorithmException e) { return null; } break; case Entity.ENTITY_MUTUAL_ECDSA_SHA1: mutual = true; case Entity.ENTITY_UNILATERAL_ECDSA_SHA1: if (serverAuth && ! mutual) return null; try { signature = Signature.getInstance(SHA1_WITH_ECDSA); } catch (NoSuchAlgorithmException e) { return null; } break; default: { return null; } } final Object rngNameValue = props.get(WildFlySasl.SECURE_RNG); final String rngName = rngNameValue instanceof String ? (String) rngNameValue : null; SecureRandom secureRandom = null; if (rngName != null) { try { secureRandom = SecureRandom.getInstance(rngName); } catch (NoSuchAlgorithmException ignored) { } } final EntitySaslServer server = new EntitySaslServer(mechanism, protocol, serverName, cbh, props, mutual, signature, secureRandom); server.init(); return server; }