Class PAdESSignature

java.lang.Object
eu.europa.esig.dss.validation.DefaultAdvancedSignature
eu.europa.esig.dss.cades.validation.CAdESSignature
eu.europa.esig.dss.pades.validation.PAdESSignature
All Implemented Interfaces:
eu.europa.esig.dss.model.identifier.IdentifierBasedObject, eu.europa.esig.dss.validation.AdvancedSignature, Serializable

public class PAdESSignature extends eu.europa.esig.dss.cades.validation.CAdESSignature
Implementation of AdvancedSignature for PAdES
See Also:
  • Field Summary

    Fields inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature

    counterSignatures, detachedContents, manifestFile, offlineCertificateSource, offlineCertificateVerifier, referenceValidations, signatureCRLSource, signatureCryptographicVerification, signatureIdentifier, signatureOCSPSource, signaturePolicy, signatureTimestampSource, signingCertificateSource, structureValidationMessages
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    PAdESSignature(PdfSignatureRevision pdfSignatureRevision, List<PdfRevision> documentRevisions)
    The default constructor for PAdESSignature.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp)
     
     
    protected List<eu.europa.esig.dss.model.scope.SignatureScope>
     
     
    eu.europa.esig.dss.spi.SignatureCertificateSource
     
    eu.europa.esig.dss.spi.x509.ListCertificateSource
     
    eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL>
     
    eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP>
     
     
     
    List<eu.europa.esig.dss.validation.AdvancedSignature>
     
    eu.europa.esig.dss.spi.x509.revocation.crl.OfflineCRLSource
     
    eu.europa.esig.dss.enumerations.SignatureLevel
     
    List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken>
     
    Gets the last DSS dictionary for the signature
    eu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSource
     
    eu.europa.esig.dss.model.DSSDocument
     
    Retrieves a PdfRevision (PAdES) related to the current signature
    Gets the PdfSignatureDictionary
    eu.europa.esig.dss.validation.SignatureDigestReference
    getSignatureDigestReference(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)
    TS 119 442 - V1.1.1 - Electronic Signatures and Infrastructures (ESI), ch.
    eu.europa.esig.dss.enumerations.SignatureForm
     
    protected eu.europa.esig.dss.validation.SignatureIdentifierBuilder
     
    protected eu.europa.esig.dss.model.DSSDocument
     
     
     
    Returns a VRI creation time defined within 'TU' field of a corresponding /VRI dictionary
    Name of the related to the signature VRI dictionary
    List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken>
    Returns a list of timestamps enveloped within /VRI dictionary for the current signature
    boolean
    Checks the presence of ArchiveTimeStamp element in the signature, what is the proof -A profile existence
    boolean
    Checks the presence of an archive-time-stamp
    boolean
    Checks the presence of a validation data
    boolean
    Checks the presence of PKCS#7 corresponding SubFilter
    boolean
    Checks the presence of a signature-time-stamp
    void
    setDssCertificateSource(eu.europa.esig.dss.spi.x509.ListCertificateSource dssCertificateSource)
    Sets a joint DSS/VRI Certificate Source
    void
    setDssCRLSource(eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> dssCRLSource)
    Sets a joint DSS/VRI CRL Source
    void
    setDssOCSPSource(eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> dssOCSPSource)
    Sets a joint DSS/VRI OCSP Source

    Methods 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, hasBESProfile, hasCProfile, hasEPESProfile, hasExtendedTProfile, hasXLProfile, hasXProfile, isCounterSignature

    Methods inherited from class eu.europa.esig.dss.validation.DefaultAdvancedSignature

    addExternalEvidenceRecord, areAllSelfSignedCertificates, equals, findSignatureScope, 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, hasBProfile, hashCode, hasLTAProfile, hasLTProfile, hasTProfile, isDocHashOnlyValidation, isHashOnlyValidation, prepareOfflineCertificateVerifier, resetCertificateSource, resetRevocationSources, resetTimestampSource, setContainerContents, setDetachedContents, setManifestFile, setMasterSignature, setSignatureFilename, setSigningCertificateSource, toString, validateStructure

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • Method Details

    • setDssCertificateSource

      public void setDssCertificateSource(eu.europa.esig.dss.spi.x509.ListCertificateSource dssCertificateSource)
      Sets a joint DSS/VRI Certificate Source
      Parameters:
      dssCertificateSource - ListCertificateSource
    • setDssCRLSource

      public void setDssCRLSource(eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> dssCRLSource)
      Sets a joint DSS/VRI CRL Source
      Parameters:
      dssCRLSource - ListRevocationSource
    • setDssOCSPSource

      public void setDssOCSPSource(eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> dssOCSPSource)
      Sets a joint DSS/VRI OCSP Source
      Parameters:
      dssOCSPSource - ListRevocationSource
    • getSignatureForm

      public eu.europa.esig.dss.enumerations.SignatureForm getSignatureForm()
      Specified by:
      getSignatureForm in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getSignatureForm in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getCertificateSource

      public eu.europa.esig.dss.spi.SignatureCertificateSource getCertificateSource()
      Specified by:
      getCertificateSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getCertificateSource in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getCRLSource

      public eu.europa.esig.dss.spi.x509.revocation.crl.OfflineCRLSource getCRLSource()
      Specified by:
      getCRLSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getCRLSource in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getOCSPSource

      public eu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSource getOCSPSource()
      Specified by:
      getOCSPSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getOCSPSource in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getCompleteCertificateSource

      public eu.europa.esig.dss.spi.x509.ListCertificateSource getCompleteCertificateSource()
      Specified by:
      getCompleteCertificateSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getCompleteCertificateSource in class eu.europa.esig.dss.validation.DefaultAdvancedSignature
    • getCompleteCRLSource

      public eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> getCompleteCRLSource()
      Specified by:
      getCompleteCRLSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getCompleteCRLSource in class eu.europa.esig.dss.validation.DefaultAdvancedSignature
    • getCompleteOCSPSource

      public eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> getCompleteOCSPSource()
      Specified by:
      getCompleteOCSPSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getCompleteOCSPSource in class eu.europa.esig.dss.validation.DefaultAdvancedSignature
    • getTimestampSource

      public PAdESTimestampSource getTimestampSource()
      Specified by:
      getTimestampSource in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getTimestampSource in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getDocumentTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getDocumentTimestamps()
      Specified by:
      getDocumentTimestamps in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getDocumentTimestamps in class eu.europa.esig.dss.validation.DefaultAdvancedSignature
    • getVRITimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getVRITimestamps()
      Returns a list of timestamps enveloped within /VRI dictionary for the current signature
      Returns:
      a list of TimestampTokens
    • findSignatureScopes

      protected List<eu.europa.esig.dss.model.scope.SignatureScope> findSignatureScopes()
      Overrides:
      findSignatureScopes in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getSigningTime

      public Date getSigningTime()
      Specified by:
      getSigningTime in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getSigningTime in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getContentIdentifier

      public String getContentIdentifier()
      Overrides:
      getContentIdentifier in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getContentHints

      public String getContentHints()
      Overrides:
      getContentHints in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getCounterSignatures

      public List<eu.europa.esig.dss.validation.AdvancedSignature> getCounterSignatures()
      Specified by:
      getCounterSignatures in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getCounterSignatures in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getOriginalDocument

      public eu.europa.esig.dss.model.DSSDocument getOriginalDocument()
      Overrides:
      getOriginalDocument in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getSignerDocumentContent

      protected eu.europa.esig.dss.model.DSSDocument getSignerDocumentContent()
      Overrides:
      getSignerDocumentContent in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getSignatureIdentifierBuilder

      protected eu.europa.esig.dss.validation.SignatureIdentifierBuilder getSignatureIdentifierBuilder()
      Overrides:
      getSignatureIdentifierBuilder in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getSignatureDigestReference

      public eu.europa.esig.dss.validation.SignatureDigestReference getSignatureDigestReference(eu.europa.esig.dss.enumerations.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.
      Specified by:
      getSignatureDigestReference in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getSignatureDigestReference in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getDataFoundUpToLevel

      public eu.europa.esig.dss.enumerations.SignatureLevel getDataFoundUpToLevel()
      Specified by:
      getDataFoundUpToLevel in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      getDataFoundUpToLevel in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • getBaselineRequirementsChecker

      protected PAdESBaselineRequirementsChecker getBaselineRequirementsChecker()
      Overrides:
      getBaselineRequirementsChecker in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • createBaselineRequirementsChecker

      protected PAdESBaselineRequirementsChecker createBaselineRequirementsChecker()
      Overrides:
      createBaselineRequirementsChecker in class eu.europa.esig.dss.cades.validation.CAdESSignature
    • 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
      Overrides:
      hasAProfile in class eu.europa.esig.dss.cades.validation.CAdESSignature
      Returns:
      true if the -A extension is present
    • getDssDictionary

      public PdfDssDict getDssDictionary()
      Gets the last DSS dictionary for the signature
      Returns:
      PdfDssDict
    • getPdfRevision

      public PdfSignatureRevision getPdfRevision()
      Retrieves a PdfRevision (PAdES) related to the current signature
      Returns:
      PdfRevision
    • getPdfSignatureDictionary

      public PdfSignatureDictionary getPdfSignatureDictionary()
      Gets the PdfSignatureDictionary
      Returns:
      PdfSignatureDictionary
    • getVRIKey

      public String getVRIKey()
      Name of the related to the signature VRI dictionary
      Returns:
      related String VRI dictionary name
    • getVRICreationTime

      public Date getVRICreationTime()
      Returns a VRI creation time defined within 'TU' field of a corresponding /VRI dictionary
      Returns:
      Date of VRI dictionary creation, when present
    • addExternalTimestamp

      public void addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp)
      Specified by:
      addExternalTimestamp in interface eu.europa.esig.dss.validation.AdvancedSignature
      Overrides:
      addExternalTimestamp in class eu.europa.esig.dss.cades.validation.CAdESSignature