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 protectedPdfCMSRevision(byte[] cms, PdfSignatureDictionary signatureDictionary, PdfDssDict dssDictionary, List<String> signatureFieldNames, byte[] signedContent, boolean coverAllOriginalBytes) -
Method Summary
Modifier and Type Method Description voidaddOuterSignature(PdfRevision signatureInfo)voidcheckIntegrity()protected abstract voidcheckIntegrityOnce()booleandoesSignatureCoverAllOriginalBytes()org.bouncycastle.cms.CMSSignedDatagetCMSSignedData()Returns a built CMSSignedData objectbyte[]getContents()Returns byte array of decoding the hexadecimal string present within the /Contents dictionaryPdfDssDictgetDssDictionary()List<String>getFieldNames()Returns a list of signature field names that refer the current objectList<PdfRevision>getOuterSignatures()PdfSignatureDictionarygetPdfSigDictInfo()Returns a PDF Signature Dictionary info containerint[]getSignatureByteRange()List<SignerInfo>getSignatureInformationStore()Returns Signature Information Store contentbyte[]getSignedDocumentBytes()DategetSigningDate()protected abstract booleanisSignerInformationValidated(org.bouncycastle.cms.SignerInformation signerInformation)StringuniqueId()
-
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-DSSDocumentthe signed contentcoverAllOriginalBytes- true if the signature covers all original bytes
-
-
Method Details
-
checkIntegrity
public void checkIntegrity()- Specified by:
checkIntegrityin interfacePdfRevision
-
checkIntegrityOnce
protected abstract void checkIntegrityOnce() -
getSignedDocumentBytes
public byte[] getSignedDocumentBytes()- Specified by:
getSignedDocumentBytesin interfacePdfRevision- Returns:
- the byte of the originally signed document
-
getDssDictionary
-
uniqueId
- Specified by:
uniqueIdin interfacePdfRevision
-
getContents
public byte[] getContents()Description copied from interface:PdfRevisionReturns byte array of decoding the hexadecimal string present within the /Contents dictionary- Specified by:
getContentsin interfacePdfRevision- Returns:
- byte array
-
addOuterSignature
- Specified by:
addOuterSignaturein interfacePdfRevision
-
getOuterSignatures
- Specified by:
getOuterSignaturesin interfacePdfRevision- Returns:
- signatures that covers a document that contains this signature
-
getPdfSigDictInfo
Description copied from interface:PdfRevisionReturns a PDF Signature Dictionary info container- Specified by:
getPdfSigDictInfoin interfacePdfRevision- Returns:
PdfSignatureDictionary
-
getSignatureByteRange
public int[] getSignatureByteRange()- Specified by:
getSignatureByteRangein interfacePdfRevision
-
getSigningDate
- Specified by:
getSigningDatein interfacePdfRevision
-
getCMSSignedData
public org.bouncycastle.cms.CMSSignedData getCMSSignedData()Returns a built CMSSignedData object- Specified by:
getCMSSignedDatain interfacePdfRevision
-
doesSignatureCoverAllOriginalBytes
public boolean doesSignatureCoverAllOriginalBytes()- Specified by:
doesSignatureCoverAllOriginalBytesin interfacePdfRevision
-
getFieldNames
Description copied from interface:PdfRevisionReturns a list of signature field names that refer the current object- Specified by:
getFieldNamesin interfacePdfRevision- Returns:
- list of
Stringfield names
-
getSignatureInformationStore
Description copied from interface:PdfRevisionReturns Signature Information Store content- Specified by:
getSignatureInformationStorein interfacePdfRevision- Returns:
- list of
SignerInfos
-
isSignerInformationValidated
protected abstract boolean isSignerInformationValidated(org.bouncycastle.cms.SignerInformation signerInformation)
-