diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2016-05-12 20:30:56 +0200 |
|---|---|---|
| committer | Endi S. Dewata <edewata@redhat.com> | 2016-05-13 16:53:30 +0200 |
| commit | 882bd048dbe01d3b879dc450d2eab7b0a3f0c2ba (patch) | |
| tree | 560e44818bd451a854d6772a0df9ba5cadabc60b /base/ca/src | |
| parent | b932140728e34eb6f986646690a69d494c341ff7 (diff) | |
| download | pki-882bd048dbe01d3b879dc450d2eab7b0a3f0c2ba.tar.gz pki-882bd048dbe01d3b879dc450d2eab7b0a3f0c2ba.tar.xz pki-882bd048dbe01d3b879dc450d2eab7b0a3f0c2ba.zip | |
Added log messages for pre-op mode.
To help troubleshooting the code has been modified to log more
detailed information in pre-op mode.
https://fedorahosted.org/pki/ticket/1654
Diffstat (limited to 'base/ca/src')
| -rw-r--r-- | base/ca/src/com/netscape/ca/CertificateAuthority.java | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/base/ca/src/com/netscape/ca/CertificateAuthority.java b/base/ca/src/com/netscape/ca/CertificateAuthority.java index 253c4bb32..8ef6fd4b6 100644 --- a/base/ca/src/com/netscape/ca/CertificateAuthority.java +++ b/base/ca/src/com/netscape/ca/CertificateAuthority.java @@ -513,11 +513,14 @@ public class CertificateAuthority initSigUnit(/* retrieveKeys */ true); // init default CA attributes like cert version, validity. initDefCaAttrs(); + } catch (EBaseException e) { - if (CMS.isPreOpMode()) - ; - else + CMS.debug(e); + if (CMS.isPreOpMode()) { + CMS.debug("CertificateAuthority.init(): Swallow exception in pre-op mode"); + } else { throw e; + } } mUseNonces = mConfig.getBoolean("enableNonces", true); @@ -526,8 +529,10 @@ public class CertificateAuthority // init request queue and related modules. CMS.debug("CertificateAuthority init: initRequestQueue"); initRequestQueue(); - if (CMS.isPreOpMode()) + if (CMS.isPreOpMode()) { + CMS.debug("CertificateAuthority.init(): Abort in pre-op mode"); return; + } /* The host CA owns these resources so skip these * steps for lightweight CAs. @@ -587,10 +592,12 @@ public class CertificateAuthority CMS.debug("CertificateAuthority: finished init of host authority"); } } catch (EBaseException e) { - if (CMS.isPreOpMode()) + CMS.debug(e); + if (CMS.isPreOpMode()) { + CMS.debug("CertificateAuthority.init(): Swallow exception in pre-op mode"); return; - else - throw e; + } + throw e; } } @@ -758,6 +765,7 @@ public class CertificateAuthority */ public void startup() throws EBaseException { if (CMS.isPreOpMode()) { + CMS.debug("CertificateAuthority.startup(): Do not start CA in pre-op mode"); return; } mService.startup(); |
