Class ValidationTimeStamp

java.lang.Object
org.apache.pdfbox.examples.signature.ValidationTimeStamp

public class ValidationTimeStamp extends Object
This class wraps the TSAClient and the work that has to be done with it. Like Adding Signed TimeStamps to a signature, or creating a CMS timestamp attribute (with a signed timestamp)
  • Field Details

  • Constructor Details

  • Method Details

    • getTimeStampToken

      public byte[] getTimeStampToken(InputStream content) throws IOException
      Creates a signed timestamp token by the given input stream.
      Parameters:
      content - InputStream of the content to sign
      Returns:
      the byte[] of the timestamp token
      Throws:
      IOException
    • addSignedTimeStamp

      public org.bouncycastle.cms.CMSSignedData addSignedTimeStamp(org.bouncycastle.cms.CMSSignedData signedData) throws IOException
      Extend cms signed data with TimeStamp first or to all signers
      Parameters:
      signedData - Generated CMS signed data
      Returns:
      CMSSignedData Extended CMS signed data
      Throws:
      IOException
    • signTimeStamp

      private org.bouncycastle.cms.SignerInformation signTimeStamp(org.bouncycastle.cms.SignerInformation signer) throws IOException
      Extend CMS Signer Information with the TimeStampToken into the unsigned Attributes.
      Parameters:
      signer - information about signer
      Returns:
      information about SignerInformation
      Throws:
      IOException