diff options
Diffstat (limited to 'base/ca/src')
-rw-r--r-- | base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java index dc23042a2..42fd439de 100644 --- a/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java +++ b/base/ca/src/com/netscape/ca/CertificateAuthorityApplication.java @@ -50,14 +50,31 @@ public class CertificateAuthorityApplication extends Application { classes.add(SystemCertService.class); // security domain + IConfigStore cs = CMS.getConfigStore(); + + // check server state + int state; try { - IConfigStore cs = CMS.getConfigStore(); - String select = cs.getString("securitydomain.select"); + state = cs.getInteger("cs.state"); + } catch (EBaseException e) { + CMS.debug(e); + throw new RuntimeException(e); + } + + // if server is configured, check security domain selection + if (state == 1) { + String select; + try { + select = cs.getString("securitydomain.select"); + } catch (EBaseException e) { + CMS.debug(e); + throw new RuntimeException(e); + } + + // if it's a new security domain, register the service if ("new".equals(select)) { classes.add(SecurityDomainService.class); } - } catch (EBaseException e) { - CMS.debug(e); } // exception mapper |