>From e770f3a4ff34c27bc698d47aedc518a7ae6b31f9 Mon Sep 17 00:00:00 2001
From: "Endi S. Dewata" <edewata@redhat.com>
Date: Wed, 12 Apr 2017 03:54:29 +0200
Subject: [PATCH] Reorganized audit event constants for OCSP.

Change-Id: I3eb97554a1d0f4b86c981692ab0130b28c9c5288
---
 .../com/netscape/certsrv/logging/AuditEvent.java   | 17 ++++++++++++
 .../com/netscape/cms/authentication/CMCAuth.java   | 25 +++++++++---------
 .../netscape/cms/servlet/ocsp/AddCAServlet.java    | 22 +++++++---------
 .../netscape/cms/servlet/ocsp/AddCRLServlet.java   | 30 ++++++++++------------
 .../netscape/cms/servlet/ocsp/RemoveCAServlet.java | 17 ++++--------
 5 files changed, 56 insertions(+), 55 deletions(-)

diff --git a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
index 8abb9a563ca1000905b15b56ecc82817e4c48546..bc892a953679211a7382f65200659a54a3091e31 100644
--- a/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
+++ b/base/common/src/com/netscape/certsrv/logging/AuditEvent.java
@@ -35,6 +35,23 @@ import com.netscape.certsrv.base.MessageFormatter;
  */
 public class AuditEvent implements IBundleLogEvent {
 
+    public final static String CRL_RETRIEVAL =
+            "LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL_3";
+    public final static String CRL_VALIDATION =
+            "LOGGING_SIGNED_AUDIT_CRL_VALIDATION_2";
+    public final static String OCSP_ADD_CA_REQUEST =
+            "LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_3";
+    public final static String OCSP_ADD_CA_REQUEST_PROCESSED =
+            "LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED_3";
+    public final static String OCSP_REMOVE_CA_REQUEST =
+            "LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_3";
+    public final static String OCSP_REMOVE_CA_REQUEST_PROCESSED_SUCCESS =
+            "LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_SUCCESS_3";
+    public final static String OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE =
+            "LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE_3";
+    public final static String CMC_SIGNED_REQUEST_SIG_VERIFY =
+            "LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY_5";
+
     public final static String COMPUTE_RANDOM_DATA_REQUEST =
             "LOGGING_SIGNED_AUDIT_COMPUTE_RANDOM_DATA_REQUEST_2";
     public final static String COMPUTE_RANDOM_DATA_REQUEST_PROCESSED_SUCCESS =
diff --git a/base/server/cms/src/com/netscape/cms/authentication/CMCAuth.java b/base/server/cms/src/com/netscape/cms/authentication/CMCAuth.java
index 8523189c812328de7488c8a9181d1f64df49e17a..02aceb4b32809f6019932981717c202653595308 100644
--- a/base/server/cms/src/com/netscape/cms/authentication/CMCAuth.java
+++ b/base/server/cms/src/com/netscape/cms/authentication/CMCAuth.java
@@ -79,6 +79,7 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IConfigStore;
 import com.netscape.certsrv.base.IExtendedPluginInfo;
 import com.netscape.certsrv.base.SessionContext;
+import com.netscape.certsrv.logging.AuditEvent;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.profile.EProfileException;
 import com.netscape.certsrv.profile.IProfile;
@@ -181,8 +182,6 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
             "enrollment";
     private final static String SIGNED_AUDIT_REVOCATION_REQUEST_TYPE =
             "revocation";
-    private final static String LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY =
-            "LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY_5";
 
     /////////////////////
     // default methods //
@@ -266,7 +265,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                        AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditReqType,
@@ -285,7 +284,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                        AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditReqType,
@@ -334,7 +333,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
                         !cmcReq.hasContent()) {
                     // store a message in the signed audit log file
                     auditMessage = CMS.getLogMessage(
-                            LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                            AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                             auditSubjectID,
                             ILogger.FAILURE,
                             auditReqType,
@@ -380,7 +379,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
                         !ci.hasContent()) {
                     // store a message in the signed audit log file
                     auditMessage = CMS.getLogMessage(
-                            LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                            AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                             auditSubjectID,
                             ILogger.FAILURE,
                             auditReqType,
@@ -561,7 +560,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
                             } catch (Exception e) {
                                 // store a message in the signed audit log file
                                 auditMessage = CMS.getLogMessage(
-                                        LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                                        AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                                         auditSubjectID,
                                         ILogger.FAILURE,
                                         auditReqType,
@@ -615,7 +614,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
                             } catch (Exception e) {
                                 // store a message in the signed audit log file
                                 auditMessage = CMS.getLogMessage(
-                                        LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                                        AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                                         auditSubjectID,
                                         ILogger.FAILURE,
                                         auditReqType,
@@ -640,7 +639,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
             } catch (Exception e) {
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                        AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditReqType,
@@ -656,7 +655,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
 
             // store a message in the signed audit log file
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                    AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                     auditSubjectID,
                     ILogger.SUCCESS,
                     auditReqType,
@@ -669,7 +668,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
         } catch (EMissingCredential eAudit1) {
             // store a message in the signed audit log file
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                    AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                     auditSubjectID,
                     ILogger.FAILURE,
                     auditReqType,
@@ -683,7 +682,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
         } catch (EInvalidCredentials eAudit2) {
             // store a message in the signed audit log file
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                    AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                     auditSubjectID,
                     ILogger.FAILURE,
                     auditReqType,
@@ -697,7 +696,7 @@ public class CMCAuth implements IAuthManager, IExtendedPluginInfo,
         } catch (EBaseException eAudit3) {
             // store a message in the signed audit log file
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_CMC_SIGNED_REQUEST_SIG_VERIFY,
+                    AuditEvent.CMC_SIGNED_REQUEST_SIG_VERIFY,
                     auditSubjectID,
                     ILogger.FAILURE,
                     auditReqType,
diff --git a/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java b/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
index f19a9d646d1b255d574b13e7368ab1bcdc417e43..0088e92f9d749dc3fb20215ceeaaeea84a71ecf7 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCAServlet.java
@@ -35,6 +35,7 @@ import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.common.ICMSRequest;
 import com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord;
+import com.netscape.certsrv.logging.AuditEvent;
 import com.netscape.certsrv.logging.AuditFormat;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.ocsp.IDefStore;
@@ -69,11 +70,6 @@ public class AddCAServlet extends CMSServlet {
     private String mFormPath = null;
     private IOCSPAuthority mOCSPAuthority = null;
 
-    private final static String LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST =
-            "LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_3";
-    private final static String LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED =
-            "LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED_3";
-
     public AddCAServlet() {
         super();
     }
@@ -162,7 +158,7 @@ public class AddCAServlet extends CMSServlet {
 
         if (b64 == null) {
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST,
+                    AuditEvent.OCSP_ADD_CA_REQUEST,
                     auditSubjectID,
                     ILogger.FAILURE,
                     ILogger.SIGNED_AUDIT_EMPTY_VALUE);
@@ -175,7 +171,7 @@ public class AddCAServlet extends CMSServlet {
         auditCA = Cert.normalizeCertStr(Cert.stripCertBrackets(b64.trim()));
         // record the fact that a request to add CA is made
         auditMessage = CMS.getLogMessage(
-                LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST,
+                AuditEvent.OCSP_ADD_CA_REQUEST,
                 auditSubjectID,
                 ILogger.SUCCESS,
                 auditCA);
@@ -184,7 +180,7 @@ public class AddCAServlet extends CMSServlet {
 
         if (b64.indexOf(BEGIN_HEADER) == -1) {
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED,
+                    AuditEvent.OCSP_ADD_CA_REQUEST_PROCESSED,
                     auditSubjectID,
                     ILogger.FAILURE,
                     auditCASubjectDN);
@@ -195,7 +191,7 @@ public class AddCAServlet extends CMSServlet {
         }
         if (b64.indexOf(END_HEADER) == -1) {
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED,
+                    AuditEvent.OCSP_ADD_CA_REQUEST_PROCESSED,
                     auditSubjectID,
                     ILogger.FAILURE,
                     auditCASubjectDN);
@@ -216,7 +212,7 @@ public class AddCAServlet extends CMSServlet {
             if (cert == null) {
                 CMS.debug("AddCAServlet::process() - cert is null!");
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED,
+                        AuditEvent.OCSP_ADD_CA_REQUEST_PROCESSED,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCASubjectDN);
@@ -245,7 +241,7 @@ public class AddCAServlet extends CMSServlet {
                 auditCASubjectDN = leafCert.getSubjectDN().getName();
             } catch (Exception e) {
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED,
+                        AuditEvent.OCSP_ADD_CA_REQUEST_PROCESSED,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCASubjectDN);
@@ -270,7 +266,7 @@ public class AddCAServlet extends CMSServlet {
                 rec.set(ICRLIssuingPointRecord.ATTR_CA_CERT, leafCert.getEncoded());
             } catch (Exception e) {
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED,
+                        AuditEvent.OCSP_ADD_CA_REQUEST_PROCESSED,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCASubjectDN);
@@ -282,7 +278,7 @@ public class AddCAServlet extends CMSServlet {
             defStore.addCRLIssuingPoint(leafCert.getSubjectDN().getName(), rec);
             log(ILogger.EV_AUDIT, AuditFormat.LEVEL, "Added CA certificate " + leafCert.getSubjectDN().getName());
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_OCSP_ADD_CA_REQUEST_PROCESSED,
+                    AuditEvent.OCSP_ADD_CA_REQUEST_PROCESSED,
                     auditSubjectID,
                     ILogger.SUCCESS,
                     auditCASubjectDN);
diff --git a/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCRLServlet.java b/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCRLServlet.java
index 386ce93e74d95eab8203c8b5c05adab1b4a52f16..5b4f624d677955a85655f7f97ccec29b26c93cab 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCRLServlet.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/ocsp/AddCRLServlet.java
@@ -40,6 +40,7 @@ import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.common.ICMSRequest;
 import com.netscape.certsrv.dbs.crldb.ICRLIssuingPointRecord;
 import com.netscape.certsrv.dbs.repository.IRepositoryRecord;
+import com.netscape.certsrv.logging.AuditEvent;
 import com.netscape.certsrv.logging.AuditFormat;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.ocsp.IDefStore;
@@ -77,11 +78,6 @@ public class AddCRLServlet extends CMSServlet {
     private String mFormPath = null;
     private IOCSPAuthority mOCSPAuthority = null;
 
-    private final static String LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL =
-            "LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL_3";
-    private final static String LOGGING_SIGNED_AUDIT_CRL_VALIDATION =
-            "LOGGING_SIGNED_AUDIT_CRL_VALIDATION_2";
-
     public AddCRLServlet() {
         super();
     }
@@ -153,7 +149,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -181,7 +177,7 @@ public class AddCRLServlet extends CMSServlet {
             if (b64 == null) {
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -216,7 +212,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -237,7 +233,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -253,7 +249,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -290,7 +286,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.SUCCESS,
                         auditCRLNum);
@@ -304,7 +300,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -329,7 +325,7 @@ public class AddCRLServlet extends CMSServlet {
 
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_VALIDATION,
+                        AuditEvent.CRL_VALIDATION,
                         auditSubjectID,
                         ILogger.FAILURE);
 
@@ -383,7 +379,7 @@ public class AddCRLServlet extends CMSServlet {
 
                     // store a message in the signed audit log file
                     auditMessage = CMS.getLogMessage(
-                            LOGGING_SIGNED_AUDIT_CRL_VALIDATION,
+                            AuditEvent.CRL_VALIDATION,
                             auditSubjectID,
                             ILogger.SUCCESS);
 
@@ -400,7 +396,7 @@ public class AddCRLServlet extends CMSServlet {
 
                     // store a message in the signed audit log file
                     auditMessage = CMS.getLogMessage(
-                            LOGGING_SIGNED_AUDIT_CRL_VALIDATION,
+                            AuditEvent.CRL_VALIDATION,
                             auditSubjectID,
                             ILogger.FAILURE);
 
@@ -547,7 +543,7 @@ public class AddCRLServlet extends CMSServlet {
             if (!CRLFetched) {
                 // store a message in the signed audit log file
                 auditMessage = CMS.getLogMessage(
-                        LOGGING_SIGNED_AUDIT_CRL_RETRIEVAL,
+                        AuditEvent.CRL_RETRIEVAL,
                         auditSubjectID,
                         ILogger.FAILURE,
                         auditCRLNum);
@@ -557,7 +553,7 @@ public class AddCRLServlet extends CMSServlet {
                 if (!CRLValidated) {
                     // store a message in the signed audit log file
                     auditMessage = CMS.getLogMessage(
-                            LOGGING_SIGNED_AUDIT_CRL_VALIDATION,
+                            AuditEvent.CRL_VALIDATION,
                             auditSubjectID,
                             ILogger.FAILURE);
 
diff --git a/base/server/cms/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java b/base/server/cms/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
index 55f688a0b74060753882406c7e81c6c1eee039f1..b6352a15d3bcedb3c4dbbe4215d0ab3bf4de27a0 100644
--- a/base/server/cms/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
+++ b/base/server/cms/src/com/netscape/cms/servlet/ocsp/RemoveCAServlet.java
@@ -32,6 +32,7 @@ import com.netscape.certsrv.authorization.AuthzToken;
 import com.netscape.certsrv.base.EBaseException;
 import com.netscape.certsrv.base.IArgBlock;
 import com.netscape.certsrv.common.ICMSRequest;
+import com.netscape.certsrv.logging.AuditEvent;
 import com.netscape.certsrv.logging.ILogger;
 import com.netscape.certsrv.ocsp.IDefStore;
 import com.netscape.certsrv.ocsp.IOCSPAuthority;
@@ -56,14 +57,6 @@ public class RemoveCAServlet extends CMSServlet {
     private String mFormPath = null;
     private IOCSPAuthority mOCSPAuthority = null;
 
-    private final static String LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST =
-            "LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_3";
-    private final static String LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_SUCCESS =
-            "LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_SUCCESS_3";
-
-    private final static String LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE =
-            "LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE_3";
-
     public RemoveCAServlet() {
         super();
     }
@@ -151,7 +144,7 @@ public class RemoveCAServlet extends CMSServlet {
 
         if (caID == null) {
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE,
+                    AuditEvent.OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE,
                     auditSubjectID,
                     ILogger.FAILURE,
                     ILogger.SIGNED_AUDIT_EMPTY_VALUE);
@@ -160,7 +153,7 @@ public class RemoveCAServlet extends CMSServlet {
         }
 
         auditMessage = CMS.getLogMessage(
-                LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST,
+                AuditEvent.OCSP_REMOVE_CA_REQUEST,
                 auditSubjectID,
                 ILogger.SUCCESS,
                 caID);
@@ -175,7 +168,7 @@ public class RemoveCAServlet extends CMSServlet {
         } catch (EBaseException e) {
 
             auditMessage = CMS.getLogMessage(
-                    LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE,
+                    AuditEvent.OCSP_REMOVE_CA_REQUEST_PROCESSED_FAILURE,
                     auditSubjectID,
                     ILogger.FAILURE,
                     caID);
@@ -188,7 +181,7 @@ public class RemoveCAServlet extends CMSServlet {
         CMS.debug("RemoveCAServlet::process: CRL IssuingPoint for CA successfully removed: " + caID);
 
         auditMessage = CMS.getLogMessage(
-                LOGGING_SIGNED_AUDIT_OCSP_REMOVE_CA_REQUEST_PROCESSED_SUCCESS,
+                AuditEvent.OCSP_REMOVE_CA_REQUEST_PROCESSED_SUCCESS,
                 auditSubjectID,
                 ILogger.SUCCESS,
                 caID);
-- 
2.9.3

