summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java3
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java22
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java2
-rw-r--r--pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java10
4 files changed, 33 insertions, 4 deletions
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
index b619b3287..11c41d99a 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DatabasePanel.java
@@ -43,6 +43,7 @@ import com.netscape.cms.servlet.wizard.*;
public class DatabasePanel extends WizardPanelBase {
private static final String HOST = "localhost";
+ private static final String CLONE_HOST="Enter FQDN here";
private static final String PORT = "389";
private static final String BASEDN = "o=netscapeCertificateServer";
private static final String BINDDN = "cn=Directory Manager";
@@ -170,7 +171,7 @@ public class DatabasePanel extends WizardPanelBase {
CMS.debug("DatabasePanel display: " + e.toString());
}
} else if (select.equals("clone")) {
- hostname = HOST;
+ hostname = CLONE_HOST;
portStr = PORT;
try {
basedn = cs.getString("internaldb.basedn", "");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
index 761b816f0..aa7ce76d6 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
@@ -516,6 +516,27 @@ public class DonePanel extends WizardPanelBase {
cs.putString("cloning.module.token", cs.getString("preop.module.token", ""));
cs.putString("cloning.list", list);
+ // more cloning variables needed for non-ca clones
+
+ if (! type.equals("CA")) {
+ String val = cs.getString("preop.ca.hostname", "");
+ if (val.compareTo("") != 0) cs.putString("cloning.ca.hostname", val);
+
+ val = cs.getString("preop.ca.httpport", "");
+ if (val.compareTo("") != 0) cs.putString("cloning.ca.httpport", val);
+
+ val = cs.getString("preop.ca.httpsport", "");
+ if (val.compareTo("") != 0) cs.putString("cloning.ca.httpsport", val);
+
+ val = cs.getString("preop.ca.list", "");
+ if (val.compareTo("") != 0) cs.putString("cloning.ca.list", val);
+
+ val = cs.getString("preop.ca.pkcs7", "");
+ if (val.compareTo("") != 0) cs.putString("cloning.ca.pkcs7", val);
+
+ val = cs.getString("preop.ca.type", "");
+ if (val.compareTo("") != 0) cs.putString("cloning.ca.type", val);
+ }
cs.removeSubStore("preop");
cs.commit(false);
@@ -530,6 +551,7 @@ public class DonePanel extends WizardPanelBase {
}
} catch (Exception e) {
+ CMS.debug("Caught exception saving preop variables: " + e);
}
context.put("csstate", "1");
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java
index 9ae5689ad..4d030088c 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/RestoreKeyCertPanel.java
@@ -408,7 +408,7 @@ public class RestoreKeyCertPanel extends WizardPanelBase {
}
if (!cstype.equals("ca")) {
- c1.append(",preop.ca.hostname,preop.ca.httpport,preop.ca.httpsport,preop.ca.list,preop.ca.pkcs7,preop.ca.type");
+ c1.append(",cloning.ca.hostname,cloning.ca.httpport,cloning.ca.httpsport,cloning.ca.list,cloning.ca.pkcs7,cloning.ca.type");
}
content = "op=get&names=cloning.token,instanceId,internaldb.basedn,internaldb.ldapauth.password,internaldb.replication.password,internaldb.ldapconn.host,internaldb.ldapconn.port,internaldb.ldapauth.bindDN"+c1.toString()+"&substores="+s1.toString()+"&xmlOutput=true&sessionID="+session_id;
diff --git a/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java b/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
index 6ebdc9df3..1beac3776 100644
--- a/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
+++ b/pki/base/common/src/com/netscape/cms/servlet/csadmin/WizardPanelBase.java
@@ -627,6 +627,8 @@ public class WizardPanelBase implements IWizardPanel {
} else if (name.equals("cloning.audit_signing.nickname")) {
config.putString("preop.master.audit_signing.nickname", v);
config.putString(name, v);
+ } else if (name.startsWith("cloning.ca")) {
+ config.putString(name.replaceFirst("cloning", "preop"), v);
} else if (name.startsWith("cloning")) {
config.putString(name.replaceFirst("cloning", "preop.cert"), v);
}
@@ -1229,11 +1231,11 @@ public class WizardPanelBase implements IWizardPanel {
} else if (name.equals("cloning.subsystem.nickname")) {
config.putString("preop.master.subsystem.nickname", v);
config.putString(name, v);
- } else if (name.equals("cloning.cert.transport.nickname")) {
+ } else if (name.equals("cloning.transport.nickname")) {
config.putString("preop.master.transport.nickname", v);
config.putString("kra.transportUnit.nickName", v);
config.putString(name, v);
- } else if (name.equals("cloning.cert.storage.nickname")) {
+ } else if (name.equals("cloning.storage.nickname")) {
config.putString("preop.master.storage.nickname", v);
config.putString("kra.storageUnit.nickName", v);
config.putString(name, v);
@@ -1242,6 +1244,10 @@ public class WizardPanelBase implements IWizardPanel {
config.putString(name, v);
} else if (name.equals("cloning.module.token")) {
config.putString("preop.module.token", v);
+ } else if (name.startsWith("cloning.ca")) {
+ config.putString(name.replaceFirst("cloning", "preop"), v);
+ } else if (name.startsWith("cloning")) {
+ config.putString(name.replaceFirst("cloning", "preop.cert"), v);
} else {
config.putString(name, v);
}