From 8d5eb937f99fd18398401f3f744eb85775293e23 Mon Sep 17 00:00:00 2001 From: Matthew Harmsen Date: Thu, 6 Dec 2012 14:23:21 -0800 Subject: Implemented ability to utilize an external CA * TRAC Ticket #231 - Dogtag 10: Update PKI Deployment to handle external CA --- .../cms/servlet/csadmin/SystemConfigService.java | 26 ++++++++++++---------- 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'base/common/src/com/netscape/cms/servlet/csadmin') diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java index e4f9445d3..7013d1c8a 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/SystemConfigService.java @@ -373,21 +373,22 @@ public class SystemConfigService extends PKIService implements SystemConfigResou psStore.putString("replicationdb", replicationpwd); psStore.commit(false); - ConfigurationUtils.populateDB(); + if (data.getStepTwo() == null) { + ConfigurationUtils.populateDB(); - cs.putString("preop.internaldb.replicationpwd", replicationpwd); - cs.putString("preop.database.removeData", "false"); - cs.commit(false); - - if (data.getIsClone().equals("true")) { - CMS.debug("Start setting up replication."); - ConfigurationUtils.setupReplication(); - } + cs.putString("preop.internaldb.replicationpwd", replicationpwd); + cs.putString("preop.database.removeData", "false"); + cs.commit(false); - ConfigurationUtils.reInitSubsystem(csType); - ConfigurationUtils.populateDBManager(); - ConfigurationUtils.populateVLVIndexes(); + if (data.getIsClone().equals("true")) { + CMS.debug("Start setting up replication."); + ConfigurationUtils.setupReplication(); + } + ConfigurationUtils.reInitSubsystem(csType); + ConfigurationUtils.populateDBManager(); + ConfigurationUtils.populateVLVIndexes(); + } } catch (Exception e) { throw new PKIException("Error in populating database" + e); } @@ -560,6 +561,7 @@ public class SystemConfigService extends PKIService implements SystemConfigResou // submitting to external ca if ((data.getIssuingCA()!= null) && data.getIssuingCA().equals("External CA") && (!hasSigningCert)) { response.setSystemCerts(SystemCertDataFactory.create(certs)); + response.setStatus(SUCCESS); return response; } -- cgit