Class PDFDocTimeStamp

java.lang.Object
se.swedenconnect.sigval.commons.timestamp.TimeStamp
se.swedenconnect.sigval.pdf.timestamp.PDFDocTimeStamp
Direct Known Subclasses:
PDFSVTDocTimeStamp

public class PDFDocTimeStamp extends TimeStamp
This class parse validates and holds the essential information about a PDF document timestamp. This class may be extended to handle specialized forms of document timestamps such as a SVA document timestamp
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Field Details

    • documentTimestampSig

      protected org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature documentTimestampSig
  • Constructor Details

    • PDFDocTimeStamp

      public PDFDocTimeStamp(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature documentTimestampSig, byte[] pdfDoc, TimeStampPolicyVerifier tsPolicyVerifier) throws Exception
      Throws:
      Exception
  • Method Details

    • isSignatureCovered

      public boolean isSignatureCovered(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature signature)
      This test checks that the signature and the data signed by this signature is covered by this document timestamp. This test does NOT verify that this signature belongs to this document. The only thing that is tested is that the byte range of this signature falls within the byte range of the document timestamp.

      Other functions must be used to assure that the signature in question belongs to the same document as the document timestamp.

      Parameters:
      signature - PDF signature
      Returns:
      true if this signature falls within the byte range of the signed data of this document timestamp.