From c687255a284008f9ee5c998b7c8d5705a3e21880 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Thu, 24 Jan 2013 09:46:22 -0500 Subject: Fix get cert chain to use admin port only --- .../com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java') diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java b/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java index 7ecbb0c8c..462e05455 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/CreateSubsystemPanel.java @@ -195,6 +195,7 @@ public class CreateSubsystemPanel extends WizardPanelBase { } try { + String cstype = config.getString("cs.type", ""); config.putString("preop.subsystem.name", HttpInput.getName(request, "subsystemName")); if (select.equals("newsubsystem")) { @@ -214,7 +215,7 @@ public class CreateSubsystemPanel extends WizardPanelBase { config.putBoolean(PCERT_PREFIX + tag + ".enable", false); } - // get the master CA + // get the masterURL String index = request.getParameter("urls"); String url = ""; @@ -243,8 +244,12 @@ public class CreateSubsystemPanel extends WizardPanelBase { throw new IOException("Invalid clone URI provided. Does not match the available subsystems in " + "the security domain"); } + if (cstype.equals("CA")) { + int https_admin_port = ConfigurationUtils.getPortFromSecurityDomain(domainXML, + host, https_ee_port, "CA", "SecurePort", "SecureAdminPort"); - ConfigurationUtils.importCertChain(host, https_ee_port, "/ca/ee/ca/getCertChain", "clone"); + ConfigurationUtils.importCertChain(host, https_admin_port, "/ca/admin/ca/getCertChain", "clone"); + } } else { CMS.debug("CreateSubsystemPanel: invalid choice " + select); context.put("updateStatus", "failure"); -- cgit