summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
diff options
context:
space:
mode:
authorcfu <cfu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2008-07-02 15:49:25 +0000
committercfu <cfu@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2008-07-02 15:49:25 +0000
commit0acbe2322415c2883a3a1e135893874b79f06e7d (patch)
tree08fd4df595f2a0cb07bb529b6bba3a1994842293 /pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
parenta9f7f6c2e7cf66967dbd093da18557455311ebe1 (diff)
downloadpki-0acbe2322415c2883a3a1e135893874b79f06e7d.tar.gz
pki-0acbe2322415c2883a3a1e135893874b79f06e7d.tar.xz
pki-0acbe2322415c2883a3a1e135893874b79f06e7d.zip
453485 - CA setup wizard null pointer exception at databasepanel.
caused by fix to 446685 - backing out git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@64 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java36
1 files changed, 3 insertions, 33 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
index d8287a307..060389584 100644
--- a/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
+++ b/pki/base/common/src/com/netscape/cmscore/ldapconn/LdapAuthInfo.java
@@ -29,7 +29,6 @@ import com.netscape.certsrv.apps.*;
import com.netscape.certsrv.base.*;
import com.netscape.certsrv.ldap.*;
import com.netscape.cmscore.base.*;
-import com.netscape.cmsutil.password.*;
/**
@@ -83,13 +82,8 @@ public class LdapAuthInfo implements ILdapAuthInfo {
*/
public void init(IConfigStore config, String host, int port, boolean secure)
throws EBaseException {
-
- CMS.debug("LdapAuthInfo: init()");
- if (mInited) {
- CMS.debug("LdapAuthInfo: already initialized");
- return; // XXX throw exception here ?
- }
- CMS.debug("LdapAuthInfo: init begins");
+ if (mInited)
+ return; // XXX throw exception here ?
String authTypeStr = config.getString(PROP_LDAPAUTHTYPE);
@@ -107,48 +101,25 @@ public class LdapAuthInfo implements ILdapAuthInfo {
if (prompt == null) {
prompt = "LDAP Authentication";
- CMS.debug("LdapAuthInfo: init: prompt is null, change to "+prompt);
- } else
- CMS.debug("LdapAuthInfo: init: prompt is "+prompt);
-
-/* in init(), there should not have been passwords in memory
+ }
if (mParms[1] == null) {
mParms[1] = (String) passwords.get(prompt);
}
-*/
// Finally, interactively obtain the password from the user
if (mParms[1] == null) {
- CMS.debug("LdapAuthInfo: init: try to get it from password file");
-/* hey - should use password store interface to allow different implementations
IConfigStore mainConfig = CMS.getConfigStore();
String pwdFile = mainConfig.getString("passwordFile");
FileConfigStore pstore = new FileConfigStore(pwdFile);
mParms[1] = pstore.getString("internaldb");
-*/
-//cfu
- IPasswordStore pwdStore = CMS.getPasswordStore();
-
-// mParms[1] = pstore.getString(prompt);
-
- // support publishing dirsrv with different pwd than internaldb
- mParms[1] = pwdStore.getPassword(prompt);
- if ( mParms[1] == null) {
- CMS.debug("LdapAuthInfo: password for "+prompt+
- " not found, trying internaldb");
- mParms[1] = pwdStore.getPassword("internaldb"); // last resort
- }
// verify the password
if ((!mParms[1].equals("")) && (host == null ||
authInfoOK(host, port, secure, mParms[0], mParms[1]))) {
// The password is OK or uncheckable
- CMS.debug("LdapAuthInfo: password ok: store in memory cache");
passwords.put(prompt, mParms[1]);
} else {
-/* what do you know? Our IPasswordStore does not have a remove function.
pstore.remove("internaldb");
-*/
}
}
} else if (authTypeStr.equals(LDAP_SSLCLIENTAUTH_STR)) {
@@ -160,7 +131,6 @@ public class LdapAuthInfo implements ILdapAuthInfo {
"Unknown Ldap authentication type " + authTypeStr);
}
mInited = true;
- CMS.debug("LdapAuthInfo: init ends");
}
public void reset() {