Author: kwright
Date: Wed Apr 20 13:06:25 2016
New Revision: 1740142

URL: http://svn.apache.org/viewvc?rev=1740142&view=rev
Log:
Fix for CONNECTORS-1301.

Modified:
    manifoldcf/trunk/CHANGES.txt
    
manifoldcf/trunk/connectors/ldap/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/ldap/LDAPAuthority.java

Modified: manifoldcf/trunk/CHANGES.txt
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1740142&r1=1740141&r2=1740142&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Wed Apr 20 13:06:25 2016
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 2.5-dev =====================
 
+CONNECTORS-1301: Addition of SSL to LDAP connector broke non-SSL
+functionality.
+(Yulin He, Karl Wright)
+
 CONNECTORS-1297: Detect symlink in JCifs connector and explicitly
 skip in that case.
 (Konstantin Avdeev, Karl Wright)

Modified: 
manifoldcf/trunk/connectors/ldap/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/ldap/LDAPAuthority.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/ldap/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/ldap/LDAPAuthority.java?rev=1740142&r1=1740141&r2=1740142&view=diff
==============================================================================
--- 
manifoldcf/trunk/connectors/ldap/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/ldap/LDAPAuthority.java
 (original)
+++ 
manifoldcf/trunk/connectors/ldap/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/ldap/LDAPAuthority.java
 Wed Apr 20 13:06:25 2016
@@ -206,11 +206,11 @@ public class LDAPAuthority extends org.a
         final Hashtable env = new Hashtable();
         env.put(Context.INITIAL_CONTEXT_FACTORY, 
"com.sun.jndi.ldap.LdapCtxFactory");
         env.put(Context.PROVIDER_URL, "ldap://"; + serverName + ":" + 
serverPort + "/" + serverBase);
-        if (protocolToUse.equals("ldaps"))
+        if (protocolToUse.equals("ldaps")) {
           env.put(Context.SECURITY_PROTOCOL, "ssl");
+          env.put("java.naming.ldap.factory.socket", 
"org.apache.manifoldcf.core.common.LDAPSSLSocketFactory");
+        }
         
-        env.put("java.naming.ldap.factory.socket", 
"org.apache.manifoldcf.core.common.LDAPSSLSocketFactory");
-
         if (bindUser != null && !bindUser.isEmpty()) {
           env.put(Context.SECURITY_AUTHENTICATION, "simple");
           env.put(Context.SECURITY_PRINCIPAL, bindUser);


Reply via email to