Class PDFDocTimeStamp
java.lang.Object
se.swedenconnect.sigval.commons.timestamp.TimeStamp
se.swedenconnect.sigval.pdf.timestamp.PDFDocTimeStamp
- Direct Known Subclasses:
PDFSVTDocTimeStamp
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 Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature
Fields inherited from class se.swedenconnect.sigval.commons.timestamp.TimeStamp
certificateValidationResult, certList, exception, policyValidationClaimsList, sigCert, sigValid, timestampedData, timeStampSigBytes, tsPolicyVerifier, tstInfo
-
Constructor Summary
ConstructorsConstructorDescriptionPDFDocTimeStamp
(org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSignature documentTimestampSig, byte[] pdfDoc, TimeStampPolicyVerifier tsPolicyVerifier) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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.Methods inherited from class se.swedenconnect.sigval.commons.timestamp.TimeStamp
getCertificateValidationResult, getCertList, getException, getPolicyValidationClaimsList, getSigCert, getTimestampedData, getTimeStampSigBytes, getTsPolicyVerifier, getTstInfo, hasVerifiedTimestamp, init, isSigValid, verifyTsMessageImprint
-
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.
-