diff --git a/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPConfig.java b/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPConfig.java index a1c5997548..d72b65412b 100644 --- a/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPConfig.java +++ b/federation/ldap/src/main/java/org/keycloak/storage/ldap/LDAPConfig.java @@ -66,11 +66,7 @@ public class LDAPConfig { public String getUseTruststoreSpi() { String value = config.getFirst(LDAPConstants.USE_TRUSTSTORE_SPI); - if (LDAPConstants.USE_TRUSTSTORE_LDAPS_ONLY.equals(value)) { - value = LDAPConstants.USE_TRUSTSTORE_ALWAYS; - config.putSingle(LDAPConstants.USE_TRUSTSTORE_SPI, value); - } - return value; + return LDAPConstants.USE_TRUSTSTORE_LDAPS_ONLY.equals(value) ? LDAPConstants.USE_TRUSTSTORE_ALWAYS : value; } public String getUsersDn() {