Package eu.europa.esig.dss.pdf
Class PdfCMSRevision
java.lang.Object
eu.europa.esig.dss.pdf.PdfCMSRevision
- All Implemented Interfaces:
PdfRevision
- Direct Known Subclasses:
PdfDocTimestampRevision
,PdfSignatureRevision
public abstract class PdfCMSRevision extends Object implements PdfRevision
-
Constructor Summary
Constructors Modifier Constructor Description protected
PdfCMSRevision(byte[] cms, PdfSignatureDictionary signatureDictionary, PdfDssDict dssDictionary, List<String> signatureFieldNames, byte[] signedContent, boolean coverAllOriginalBytes)
-
Method Summary
Modifier and Type Method Description void
addOuterSignature(PdfRevision signatureInfo)
void
checkIntegrity()
protected abstract void
checkIntegrityOnce()
boolean
doesSignatureCoverAllOriginalBytes()
org.bouncycastle.cms.CMSSignedData
getCMSSignedData()
Returns a built CMSSignedData objectbyte[]
getContents()
Returns byte array of decoding the hexadecimal string present within the /Contents dictionaryPdfDssDict
getDssDictionary()
List<String>
getFieldNames()
Returns a list of signature field names that refer the current objectList<PdfRevision>
getOuterSignatures()
PdfSignatureDictionary
getPdfSigDictInfo()
Returns a PDF Signature Dictionary info containerint[]
getSignatureByteRange()
List<SignerInfo>
getSignatureInformationStore()
Returns Signature Information Store contentbyte[]
getSignedDocumentBytes()
Date
getSigningDate()
protected abstract boolean
isSignerInformationValidated(org.bouncycastle.cms.SignerInformation signerInformation)
String
uniqueId()
-
Constructor Details
-
PdfCMSRevision
protected PdfCMSRevision(byte[] cms, PdfSignatureDictionary signatureDictionary, PdfDssDict dssDictionary, List<String> signatureFieldNames, byte[] signedContent, boolean coverAllOriginalBytes)- Parameters:
signatureDictionary
- The signature dictionarydssDictionary
- the DSS dictionarycms
- the signature binarysignedContent
-DSSDocument
the signed contentcoverAllOriginalBytes
- true if the signature covers all original bytes
-
-
Method Details
-
checkIntegrity
public void checkIntegrity()- Specified by:
checkIntegrity
in interfacePdfRevision
-
checkIntegrityOnce
protected abstract void checkIntegrityOnce() -
getSignedDocumentBytes
public byte[] getSignedDocumentBytes()- Specified by:
getSignedDocumentBytes
in interfacePdfRevision
- Returns:
- the byte of the originally signed document
-
getDssDictionary
-
uniqueId
- Specified by:
uniqueId
in interfacePdfRevision
-
getContents
public byte[] getContents()Description copied from interface:PdfRevision
Returns byte array of decoding the hexadecimal string present within the /Contents dictionary- Specified by:
getContents
in interfacePdfRevision
- Returns:
- byte array
-
addOuterSignature
- Specified by:
addOuterSignature
in interfacePdfRevision
-
getOuterSignatures
- Specified by:
getOuterSignatures
in interfacePdfRevision
- Returns:
- signatures that covers a document that contains this signature
-
getPdfSigDictInfo
Description copied from interface:PdfRevision
Returns a PDF Signature Dictionary info container- Specified by:
getPdfSigDictInfo
in interfacePdfRevision
- Returns:
PdfSignatureDictionary
-
getSignatureByteRange
public int[] getSignatureByteRange()- Specified by:
getSignatureByteRange
in interfacePdfRevision
-
getSigningDate
- Specified by:
getSigningDate
in interfacePdfRevision
-
getCMSSignedData
public org.bouncycastle.cms.CMSSignedData getCMSSignedData()Returns a built CMSSignedData object- Specified by:
getCMSSignedData
in interfacePdfRevision
-
doesSignatureCoverAllOriginalBytes
public boolean doesSignatureCoverAllOriginalBytes()- Specified by:
doesSignatureCoverAllOriginalBytes
in interfacePdfRevision
-
getFieldNames
Description copied from interface:PdfRevision
Returns a list of signature field names that refer the current object- Specified by:
getFieldNames
in interfacePdfRevision
- Returns:
- list of
String
field names
-
getSignatureInformationStore
Description copied from interface:PdfRevision
Returns Signature Information Store content- Specified by:
getSignatureInformationStore
in interfacePdfRevision
- Returns:
- list of
SignerInfo
s
-
isSignerInformationValidated
protected abstract boolean isSignerInformationValidated(org.bouncycastle.cms.SignerInformation signerInformation)
-