Browse Source

fix #1052 add SECURITY_PROTOCOL

Shinsuke Sugaya 8 years ago
parent
commit
9fe3c068af
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/main/java/org/codelibs/fess/ldap/LdapManager.java

+ 3 - 0
src/main/java/org/codelibs/fess/ldap/LdapManager.java

@@ -71,6 +71,9 @@ public class LdapManager {
         env.put(Context.PROVIDER_URL, providerUrl);
         env.put(Context.SECURITY_PRINCIPAL, principal);
         env.put(Context.SECURITY_CREDENTIALS, credntials);
+        if (providerUrl != null && providerUrl.startsWith("ldaps://")) {
+            env.put(Context.SECURITY_PROTOCOL, "ssl");
+        }
         return env;
     }