From 4d5ecb5dd3e1f4eabbe29ab2ddbfeb825f9f4233 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Thu, 25 May 2017 22:53:03 +0200 Subject: Added DELTA_CRL_PUBLISHING audit event. A new DELTA_CRL_PUBLISHING audit event has been added which will be generated when delta CRL publishing is complete. https://pagure.io/dogtagpki/issue/2651 Change-Id: I38f84fc2d00ea57ef13f0ee50998da9239437372 --- .../logging/event/DeltaCRLPublishingEvent.java | 63 ++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 base/common/src/com/netscape/certsrv/logging/event/DeltaCRLPublishingEvent.java (limited to 'base/common') diff --git a/base/common/src/com/netscape/certsrv/logging/event/DeltaCRLPublishingEvent.java b/base/common/src/com/netscape/certsrv/logging/event/DeltaCRLPublishingEvent.java new file mode 100644 index 000000000..d6521d7d1 --- /dev/null +++ b/base/common/src/com/netscape/certsrv/logging/event/DeltaCRLPublishingEvent.java @@ -0,0 +1,63 @@ +// --- BEGIN COPYRIGHT BLOCK --- +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; version 2 of the License. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License along +// with this program; if not, write to the Free Software Foundation, Inc., +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +// (C) 2017 Red Hat, Inc. +// All rights reserved. +// --- END COPYRIGHT BLOCK --- +package com.netscape.certsrv.logging.event; + +import java.math.BigInteger; + +import com.netscape.certsrv.logging.AuditEvent; +import com.netscape.certsrv.logging.ILogger; + +public class DeltaCRLPublishingEvent extends AuditEvent { + + private static final long serialVersionUID = 1L; + + public final static String LOGGING_PROPERTY = + "LOGGING_SIGNED_AUDIT_DELTA_CRL_PUBLISHING"; + + public DeltaCRLPublishingEvent( + String subjectID, + BigInteger crlNumber) { + + super(LOGGING_PROPERTY); + + setAttribute("CRLnum", crlNumber); + + setParameters(new Object[] { + subjectID, + ILogger.SUCCESS, + getAttributeList() + }); + } + + public DeltaCRLPublishingEvent( + String subjectID, + BigInteger crlNumber, + String reason) { + + super(LOGGING_PROPERTY); + + setAttribute("CRLnum", crlNumber); + setAttribute("FailureReason", reason); + + setParameters(new Object[] { + subjectID, + ILogger.FAILURE, + getAttributeList() + }); + } +} -- cgit