From 80aff97bedf8c2ee5f58209f36f18ebbc475ccb1 Mon Sep 17 00:00:00 2001 From: Ade Lee Date: Fri, 13 Apr 2012 13:51:32 -0400 Subject: RESTful servlet to configure system in a single servlet. Installation code common to the panels and the installation servlet are extracted to a ConfigurationUtils file. The panel code will be cleaned up to use the code in this class in a later commit. Contains restful client and test driver code. The test driver code should be modified and placed in a junit/system test framework. Installation has been tested to work with the following installations: master CA, clone CA, KRA, OCSP, TKS, subordinate CA, CA signed by external CA (parts 1 and 2). Ticket #155 --- base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java') diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java b/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java index e3068d7b3..35ec7c515 100644 --- a/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java +++ b/base/common/src/com/netscape/cms/servlet/csadmin/CertUtil.java @@ -194,7 +194,9 @@ public class CertUtil { return certReqs; } catch (Throwable e) { CMS.debug(e); - context.put("errorString", e.toString()); + if (context != null) { + context.put("errorString", e.toString()); + } CMS.debug("CertUtil getPKCS10: " + e.toString()); throw new IOException(e.toString()); } @@ -453,8 +455,9 @@ public class CertUtil { } if (cr == null) { - context.put("errorString", - "Ceritifcate Authority is not ready to serve."); + if (context != null) { + context.put("errorString", "Ceritifcate Authority is not ready to serve."); + } throw new IOException("Ceritifcate Authority is not ready to serve."); } -- cgit