Class PAdESSignature
java.lang.Object
eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
eu.europa.esig.dss.cades.validation.CAdESSignature
eu.europa.esig.dss.pades.validation.PAdESSignature
- All Implemented Interfaces:
IdentifierBasedObject,AdvancedSignature,Serializable
Implementation of AdvancedSignature for PAdES
- See Also:
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
counterSignatures, detachedContents, manifestFile, offlineCertificateSource, referenceValidations, signatureCRLSource, signatureCryptographicVerification, signatureIdentifier, signatureOCSPSource, signaturePolicy, signatureTimestampSource, signingCertificateSource, structureValidationMessages -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPAdESSignature(PdfSignatureRevision pdfSignatureRevision, List<PdfRevision> documentRevisions) The default constructor for PAdESSignature. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalTimestamp(TimestampToken timestamp) This method allows to add an external timestamp.protected PAdESBaselineRequirementsCheckercreateBaselineRequirementsChecker(CertificateVerifier certificateVerifier) Instantiates aBaselineRequirementsCheckeraccording to the signature formatprotected List<SignatureScope> Finds signature scopesprotected PAdESBaselineRequirementsCheckerReturns a cached instance of theBaselineRequirementsCheckerGets a certificate source which contains ALL certificates embedded in the signature.Gets a ListCertificateSource representing a merged source fromsignatureCertificateSourceand all included to the signature timestamp objectsGets a ListRevocationSource representing a merged source fromsignatureCRLSourseand all included to the signature timestamp objectsGets a ListRevocationSource representing a merged source fromsignatureOCSPSourseand all included to the signature timestamp objectsGets Content HintsGets ContentIdentifier StringReturns a list of counter signatures applied to this signatureGets a CRL source which contains ALL CRLs embedded in the signature.This method returns the signature levelReturns a list of timestamps defined with the 'DocTimeStamp' type NOTE: applicable only for PAdESGets the last DSS dictionary for the signatureGets an OCSP source which contains ALL OCSP responses embedded in the signature.Returns the original signed documentRetrieves a PdfRevision (PAdES) related to the current signatureGets thePdfSignatureDictionarygetSignatureDigestReference(DigestAlgorithm digestAlgorithm) TS 119 442 - V1.1.1 - Electronic Signatures and Infrastructures (ESI), ch. 5.1.4.2.1.3 XML component: In case of PAdES signatures, the input of the digest value computation shall be the result of decoding the hexadecimal string present within the Contents field of the Signature PDF dictionary enclosing one PAdES digital signature.Specifies the format of the signatureprotected SignatureIdentifierBuilderReturns a builder to define and build a signature Idprotected DSSDocumentThis method extracts a document content that was signed NOTE: Some differences are possible with PAdESReturns the signing time included within the signature.Gets a Signature Timestamp source which contains ALL timestamps embedded in the signature.Returns a VRI creation time defined within 'TU' field of a corresponding /VRI dictionaryName of the related to the signature VRI dictionaryReturns a list of timestamps enveloped within /VRI dictionary for the current signaturebooleanChecks the presence of ArchiveTimeStamp element in the signature, what is the proof -A profile existencebooleanChecks the presence of an archive-time-stampbooleanChecks the presence of a validation databooleanChecks the presence of PKCS#7 corresponding SubFilterbooleanChecks the presence of a signature-time-stampvoidsetDssCertificateSource(ListCertificateSource dssCertificateSource) Sets a joint DSS/VRI Certificate SourcevoidsetDssCRLSource(ListRevocationSource<CRL> dssCRLSource) Sets a joint DSS/VRI CRL SourcevoidsetDssOCSPSource(ListRevocationSource<OCSP> dssOCSPSource) Sets a joint DSS/VRI OCSP SourceMethods inherited from class eu.europa.esig.dss.cades.validation.CAdESSignature
buildSignaturePolicy, checkSignatureIntegrity, getCertifiedSignerRoles, getClaimedSignerRoles, getCmsSignedData, getCommitmentTypeIndications, getContentType, getCounterSignatureStore, getDAIdentifier, getDataToBeSignedRepresentation, getDigestAlgorithm, getEncryptionAlgorithm, getMaskGenerationFunction, getMessageDigestAlgorithms, getMessageDigestValue, getMimeType, getReferenceValidations, getReferenceValidations, getSignatureAlgorithm, getSignaturePolicyStore, getSignatureProductionPlace, getSignatureValue, getSignedAssertions, getSignerId, getSignerInformation, getSignerInformationStoreInfos, isCounterSignatureMethods inherited from class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
addExternalEvidenceRecord, areAllSelfSignedCertificates, equals, getAllEvidenceRecords, getAllTimestamps, getArchiveTimestamps, getCandidatesForSigningCertificate, getCertificates, getContainerContents, getContentTimestamps, getCounterSignaturesCertificateSource, getCounterSignaturesCRLSource, getCounterSignaturesOCSPSource, getDetachedContents, getDetachedEvidenceRecords, getDetachedTimestamps, getDSSId, getEmbeddedEvidenceRecords, getId, getManifestFile, getMasterSignature, getSignatureCryptographicVerification, getSignatureFilename, getSignaturePolicy, getSignatureScopes, getSignatureTimestamps, getSignerRoles, getSigningCertificateToken, getStructureValidationResult, getTimestampsX1, getTimestampsX2, hasBESProfile, hasBProfile, hasCProfile, hasEPESProfile, hasExtendedTProfile, hashCode, hasLTAProfile, hasLTProfile, hasTProfile, hasXLProfile, hasXProfile, initBaselineRequirementsChecker, isDocHashOnlyValidation, isHashOnlyValidation, resetCertificateSource, resetRevocationSources, resetTimestampSource, setContainerContents, setDetachedContents, setManifestFile, setMasterSignature, setSignatureFilename, setSigningCertificateSource, toString, validateStructure
-
Constructor Details
-
PAdESSignature
protected PAdESSignature(PdfSignatureRevision pdfSignatureRevision, List<PdfRevision> documentRevisions) The default constructor for PAdESSignature.- Parameters:
pdfSignatureRevision- a relatedPdfSignatureRevisiondocumentRevisions- a list ofPdfRevisionextracted from the validating document
-
-
Method Details
-
setDssCertificateSource
Sets a joint DSS/VRI Certificate Source- Parameters:
dssCertificateSource-ListCertificateSource
-
setDssCRLSource
Sets a joint DSS/VRI CRL Source- Parameters:
dssCRLSource-ListRevocationSource
-
setDssOCSPSource
Sets a joint DSS/VRI OCSP Source- Parameters:
dssOCSPSource-ListRevocationSource
-
getSignatureForm
Description copied from interface:AdvancedSignatureSpecifies the format of the signature- Specified by:
getSignatureFormin interfaceAdvancedSignature- Overrides:
getSignatureFormin classCAdESSignature- Returns:
SignatureForm
-
getCertificateSource
Description copied from interface:AdvancedSignatureGets a certificate source which contains ALL certificates embedded in the signature.- Specified by:
getCertificateSourcein interfaceAdvancedSignature- Overrides:
getCertificateSourcein classCAdESSignature- Returns:
SignatureCertificateSource
-
getCRLSource
Description copied from interface:AdvancedSignatureGets a CRL source which contains ALL CRLs embedded in the signature.- Specified by:
getCRLSourcein interfaceAdvancedSignature- Overrides:
getCRLSourcein classCAdESSignature- Returns:
OfflineRevocationSource
-
getOCSPSource
Description copied from interface:AdvancedSignatureGets an OCSP source which contains ALL OCSP responses embedded in the signature.- Specified by:
getOCSPSourcein interfaceAdvancedSignature- Overrides:
getOCSPSourcein classCAdESSignature- Returns:
OfflineRevocationSource
-
getCompleteCertificateSource
Description copied from interface:AdvancedSignatureGets a ListCertificateSource representing a merged source fromsignatureCertificateSourceand all included to the signature timestamp objects- Specified by:
getCompleteCertificateSourcein interfaceAdvancedSignature- Overrides:
getCompleteCertificateSourcein classDefaultAdvancedSignature- Returns:
ListCertificateSource
-
getCompleteCRLSource
Description copied from interface:AdvancedSignatureGets a ListRevocationSource representing a merged source fromsignatureCRLSourseand all included to the signature timestamp objects- Specified by:
getCompleteCRLSourcein interfaceAdvancedSignature- Overrides:
getCompleteCRLSourcein classDefaultAdvancedSignature- Returns:
ListRevocationSource
-
getCompleteOCSPSource
Description copied from interface:AdvancedSignatureGets a ListRevocationSource representing a merged source fromsignatureOCSPSourseand all included to the signature timestamp objects- Specified by:
getCompleteOCSPSourcein interfaceAdvancedSignature- Overrides:
getCompleteOCSPSourcein classDefaultAdvancedSignature- Returns:
ListRevocationSource
-
getTimestampSource
Description copied from interface:AdvancedSignatureGets a Signature Timestamp source which contains ALL timestamps embedded in the signature.- Specified by:
getTimestampSourcein interfaceAdvancedSignature- Overrides:
getTimestampSourcein classCAdESSignature- Returns:
SignatureTimestampSource
-
getDocumentTimestamps
Description copied from interface:AdvancedSignatureReturns a list of timestamps defined with the 'DocTimeStamp' type NOTE: applicable only for PAdES- Specified by:
getDocumentTimestampsin interfaceAdvancedSignature- Overrides:
getDocumentTimestampsin classDefaultAdvancedSignature- Returns:
ListofTimestampTokens
-
getVRITimestamps
Returns a list of timestamps enveloped within /VRI dictionary for the current signature- Returns:
- a list of
TimestampTokens
-
findSignatureScopes
Description copied from class:DefaultAdvancedSignatureFinds signature scopes- Overrides:
findSignatureScopesin classCAdESSignature- Returns:
- a list of
SignatureScopes
-
getSigningTime
Description copied from interface:AdvancedSignatureReturns the signing time included within the signature.- Specified by:
getSigningTimein interfaceAdvancedSignature- Overrides:
getSigningTimein classCAdESSignature- Returns:
Daterepresenting the signing time or null
-
getContentIdentifier
Description copied from class:CAdESSignatureGets ContentIdentifier String- Overrides:
getContentIdentifierin classCAdESSignature- Returns:
- content identifier as
String
-
getContentHints
Description copied from class:CAdESSignatureGets Content Hints- Overrides:
getContentHintsin classCAdESSignature- Returns:
- content hints as
String
-
getCounterSignatures
Description copied from interface:AdvancedSignatureReturns a list of counter signatures applied to this signature- Specified by:
getCounterSignaturesin interfaceAdvancedSignature- Overrides:
getCounterSignaturesin classCAdESSignature- Returns:
- a
ListofAdvancedSignaturesrepresenting the counter signatures
-
getOriginalDocument
Description copied from class:CAdESSignatureReturns the original signed document- Overrides:
getOriginalDocumentin classCAdESSignature- Returns:
DSSDocument
-
getSignerDocumentContent
Description copied from class:CAdESSignatureThis method extracts a document content that was signed NOTE: Some differences are possible with PAdES- Overrides:
getSignerDocumentContentin classCAdESSignature- Returns:
DSSDocument
-
getSignatureIdentifierBuilder
Description copied from class:DefaultAdvancedSignatureReturns a builder to define and build a signature Id- Overrides:
getSignatureIdentifierBuilderin classCAdESSignature- Returns:
SignatureIdentifierBuilder
-
getSignatureDigestReference
TS 119 442 - V1.1.1 - Electronic Signatures and Infrastructures (ESI), ch. 5.1.4.2.1.3 XML component: In case of PAdES signatures, the input of the digest value computation shall be the result of decoding the hexadecimal string present within the Contents field of the Signature PDF dictionary enclosing one PAdES digital signature.- Specified by:
getSignatureDigestReferencein interfaceAdvancedSignature- Overrides:
getSignatureDigestReferencein classCAdESSignature- Parameters:
digestAlgorithm-DigestAlgorithmto use- Returns:
SignatureDigestReference
-
getDataFoundUpToLevel
Description copied from interface:AdvancedSignatureThis method returns the signature level- Specified by:
getDataFoundUpToLevelin interfaceAdvancedSignature- Overrides:
getDataFoundUpToLevelin classCAdESSignature- Returns:
- a value of
SignatureLevel
-
getBaselineRequirementsChecker
Description copied from class:DefaultAdvancedSignatureReturns a cached instance of theBaselineRequirementsChecker- Overrides:
getBaselineRequirementsCheckerin classCAdESSignature- Returns:
BaselineRequirementsChecker
-
createBaselineRequirementsChecker
protected PAdESBaselineRequirementsChecker createBaselineRequirementsChecker(CertificateVerifier certificateVerifier) Description copied from class:DefaultAdvancedSignatureInstantiates aBaselineRequirementsCheckeraccording to the signature format- Overrides:
createBaselineRequirementsCheckerin classCAdESSignature- Parameters:
certificateVerifier-CertificateVerifierto be used- Returns:
BaselineRequirementsChecker
-
hasPKCS7Profile
public boolean hasPKCS7Profile()Checks the presence of PKCS#7 corresponding SubFilter- Returns:
- true if PKCS#7 Profile is detected
-
hasPKCS7TProfile
public boolean hasPKCS7TProfile()Checks the presence of a signature-time-stamp- Returns:
- true if PKCS#7-T Profile is detected
-
hasPKCS7LTProfile
public boolean hasPKCS7LTProfile()Checks the presence of a validation data- Returns:
- true if PKCS#7-LT Profile is detected
-
hasPKCS7LTAProfile
public boolean hasPKCS7LTAProfile()Checks the presence of an archive-time-stamp- Returns:
- true if PKCS#7-LTA Profile is detected
-
hasAProfile
public boolean hasAProfile()Checks the presence of ArchiveTimeStamp element in the signature, what is the proof -A profile existence- Specified by:
hasAProfilein interfaceAdvancedSignature- Overrides:
hasAProfilein classDefaultAdvancedSignature- Returns:
- true if the -A extension is present
-
getDssDictionary
Gets the last DSS dictionary for the signature- Returns:
PdfDssDict
-
getPdfRevision
Retrieves a PdfRevision (PAdES) related to the current signature- Returns:
PdfRevision
-
getPdfSignatureDictionary
Gets thePdfSignatureDictionary- Returns:
PdfSignatureDictionary
-
getVRIKey
-
getVRICreationTime
-
addExternalTimestamp
Description copied from interface:AdvancedSignatureThis method allows to add an external timestamp. The given timestamp must be processed before. NOTE: The method is supported only for CAdES signatures- Specified by:
addExternalTimestampin interfaceAdvancedSignature- Overrides:
addExternalTimestampin classCAdESSignature- Parameters:
timestamp- the timestamp token
-