summaryrefslogtreecommitdiffstats
path: root/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
diff options
context:
space:
mode:
Diffstat (limited to 'base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java')
-rw-r--r--base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java22
1 files changed, 14 insertions, 8 deletions
diff --git a/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java b/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
index 2ac4085c7..07f4ca003 100644
--- a/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
+++ b/base/server/cmscore/src/com/netscape/cmscore/ldapconn/LdapBoundConnFactory.java
@@ -17,18 +17,19 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.ldapconn;
-import netscape.ldap.LDAPConnection;
-import netscape.ldap.LDAPException;
-import netscape.ldap.LDAPSocketFactory;
-
import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.EBaseException;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.ldap.ELdapException;
import com.netscape.certsrv.ldap.ELdapServerDownException;
+import com.netscape.certsrv.ldap.ILdapAuthInfo;
import com.netscape.certsrv.ldap.ILdapBoundConnFactory;
import com.netscape.certsrv.logging.ILogger;
+import netscape.ldap.LDAPConnection;
+import netscape.ldap.LDAPException;
+import netscape.ldap.LDAPSocketFactory;
+
/**
* Factory for getting LDAP Connections to a LDAP server with the same
* LDAP authentication.
@@ -119,8 +120,14 @@ public class LdapBoundConnFactory implements ILdapBoundConnFactory {
throws ELdapException, EBaseException {
CMS.debug("LdapBoundConnFactory: init ");
- LdapConnInfo connInfo =
- new LdapConnInfo(config.getSubStore(PROP_LDAPCONNINFO));
+
+ LdapConnInfo connInfo = new LdapConnInfo(
+ config.getSubStore(PROP_LDAPCONNINFO));
+
+ LdapAuthInfo authInfo = new LdapAuthInfo(
+ config.getSubStore(PROP_LDAPAUTHINFO),
+ connInfo.getHost(), connInfo.getPort(), connInfo.getSecure());
+ CMS.debug("Auth type: " + (authInfo.getAuthType() == ILdapAuthInfo.LDAP_AUTHTYPE_BASICAUTH ? "basic" : "client cert"));
mErrorIfDown = config.getBoolean(PROP_ERROR_IF_DOWN, mDefErrorIfDown);
@@ -130,8 +137,7 @@ public class LdapBoundConnFactory implements ILdapBoundConnFactory {
init(config.getInteger(PROP_MINCONNS, mMinConns),
config.getInteger(PROP_MAXCONNS, mMaxConns),
connInfo,
- new LdapAuthInfo(config.getSubStore(PROP_LDAPAUTHINFO),
- connInfo.getHost(), connInfo.getPort(), connInfo.getSecure()));
+ authInfo);
}
/**