org.opends.server.loggers
Class SignatureAction

java.lang.Object
  extended by org.opends.server.loggers.SignatureAction
All Implemented Interfaces:
PostRotationAction

public class SignatureAction
extends java.lang.Object
implements PostRotationAction

This class implements a post rotation action that signs the file.


Constructor Summary
SignatureAction(java.lang.String origFile, java.lang.String alias)
          Create the signature action based on the log file name, and the certificate alias to use for signing.
SignatureAction(java.lang.String origFile, java.lang.String sigAlg, java.lang.String digestAlg, java.lang.String alias)
          Create the signature action based on the log file name, the signature algorithm, the digest algorithm, and the certificate alias to use for signing.
 
Method Summary
 boolean execute()
          The signature action that is executed.
 boolean verify()
          Verify the signature int the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignatureAction

public SignatureAction(java.lang.String origFile,
                       java.lang.String alias)
Create the signature action based on the log file name, and the certificate alias to use for signing.

Parameters:
origFile - The source file name to sign.
alias - The certificate alias to use for signing.

SignatureAction

public SignatureAction(java.lang.String origFile,
                       java.lang.String sigAlg,
                       java.lang.String digestAlg,
                       java.lang.String alias)
Create the signature action based on the log file name, the signature algorithm, the digest algorithm, and the certificate alias to use for signing.

Parameters:
origFile - The source file name to sign.
sigAlg - The signature algorithm to use.
digestAlg - The MD5 digest algorithm to use.
alias - The certificate alias to use for signing.
Method Detail

execute

public boolean execute()
The signature action that is executed. Returns true if the action succeeded and false otherwise.

Specified by:
execute in interface PostRotationAction
Returns:
true if the signature was generated successfully, or false if not.

verify

public boolean verify()
Verify the signature int the log file. Returns true if the the signature is valid and false otherwise.

Returns:
true if the signature is valid, or false if not.