Class PAdESSignature

java.lang.Object
eu.europa.esig.dss.pades.validation.PAdESSignature
All Implemented Interfaces:
Serializable

public class PAdESSignature extends Object
Implementation of AdvancedSignature for PAdES
See Also:
  • Field Details

    • detachedContents

      protected List<eu.europa.esig.dss.model.DSSDocument> detachedContents
    • manifestFile

      protected eu.europa.esig.dss.model.ManifestFile manifestFile
    • referenceValidations

      protected List<eu.europa.esig.dss.model.ReferenceValidation> referenceValidations
    • signatureCryptographicVerification

      protected eu.europa.esig.dss.model.signature.SignatureCryptographicVerification signatureCryptographicVerification
    • structureValidationMessages

      protected List<String> structureValidationMessages
    • signingCertificateSource

      protected eu.europa.esig.dss.spi.x509.CertificateSource signingCertificateSource
    • offlineCertificateSource

      protected eu.europa.esig.dss.spi.SignatureCertificateSource offlineCertificateSource
    • signatureCRLSource

      protected eu.europa.esig.dss.spi.x509.revocation.crl.OfflineCRLSource signatureCRLSource
    • signatureOCSPSource

      protected eu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSource signatureOCSPSource
    • signatureTimestampSource

      protected eu.europa.esig.dss.spi.x509.tsp.TimestampSource signatureTimestampSource
    • counterSignatures

      protected List<eu.europa.esig.dss.spi.signature.AdvancedSignature> counterSignatures
    • signaturePolicy

      protected eu.europa.esig.dss.model.signature.SignaturePolicy signaturePolicy
    • signatureIdentifier

      protected eu.europa.esig.dss.spi.signature.identifier.SignatureIdentifier signatureIdentifier
  • 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()
    • getCertificateSource

      public eu.europa.esig.dss.spi.SignatureCertificateSource getCertificateSource()
    • getCRLSource

      public eu.europa.esig.dss.spi.x509.revocation.crl.OfflineCRLSource getCRLSource()
    • getOCSPSource

      public eu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSource getOCSPSource()
    • getCompleteCertificateSource

      public eu.europa.esig.dss.spi.x509.ListCertificateSource getCompleteCertificateSource()
    • getCompleteCRLSource

      public eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> getCompleteCRLSource()
    • getCompleteOCSPSource

      public eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> getCompleteOCSPSource()
    • getTimestampSource

      public PAdESTimestampSource getTimestampSource()
    • getDocumentTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getDocumentTimestamps()
    • 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()
    • getSigningTime

      public Date getSigningTime()
    • getContentIdentifier

      public String getContentIdentifier()
    • getContentHints

      public String getContentHints()
    • getCounterSignatures

      public List<eu.europa.esig.dss.spi.signature.AdvancedSignature> getCounterSignatures()
    • getOriginalDocument

      public eu.europa.esig.dss.model.DSSDocument getOriginalDocument()
    • getSignerDocumentContent

      protected eu.europa.esig.dss.model.DSSDocument getSignerDocumentContent()
    • getSignatureIdentifierBuilder

      protected eu.europa.esig.dss.spi.signature.identifier.SignatureIdentifierBuilder getSignatureIdentifierBuilder()
    • getSignatureDigestReference

      public eu.europa.esig.dss.model.signature.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.
    • hasLTVProfile

      public boolean hasLTVProfile()
      Checks if the LTV-level is present in the signature
      Returns:
      TRUE if the LTV-level is present, FALSE otherwise
    • getDataFoundUpToLevel

      public eu.europa.esig.dss.enumerations.SignatureLevel getDataFoundUpToLevel()
    • getBaselineRequirementsChecker

      protected PAdESBaselineRequirementsChecker getBaselineRequirementsChecker()
    • createBaselineRequirementsChecker

      protected PAdESBaselineRequirementsChecker createBaselineRequirementsChecker(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier)
    • 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
      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)
    • getSignerId

      public org.bouncycastle.cms.SignerId getSignerId()
    • buildSignaturePolicy

      protected eu.europa.esig.dss.model.signature.SignaturePolicy buildSignaturePolicy()
    • getSignaturePolicyStore

      public eu.europa.esig.dss.model.SignaturePolicyStore getSignaturePolicyStore()
    • getCMS

      public eu.europa.esig.dss.cms.CMS getCMS()
    • getSignatureProductionPlace

      public eu.europa.esig.dss.model.signature.SignatureProductionPlace getSignatureProductionPlace()
    • getCommitmentTypeIndications

      public List<eu.europa.esig.dss.model.signature.CommitmentTypeIndication> getCommitmentTypeIndications()
    • getSignedAssertions

      public List<eu.europa.esig.dss.model.signature.SignerRole> getSignedAssertions()
    • getClaimedSignerRoles

      public List<eu.europa.esig.dss.model.signature.SignerRole> getClaimedSignerRoles()
    • getCertifiedSignerRoles

      public List<eu.europa.esig.dss.model.signature.SignerRole> getCertifiedSignerRoles()
    • getEncryptionAlgorithm

      public eu.europa.esig.dss.enumerations.EncryptionAlgorithm getEncryptionAlgorithm()
    • getDigestAlgorithm

      public eu.europa.esig.dss.enumerations.DigestAlgorithm getDigestAlgorithm()
    • getSignatureAlgorithm

      public eu.europa.esig.dss.enumerations.SignatureAlgorithm getSignatureAlgorithm()
    • checkSignatureIntegrity

      public void checkSignatureIntegrity()
    • getReferenceValidations

      public List<eu.europa.esig.dss.model.ReferenceValidation> getReferenceValidations(org.bouncycastle.cms.SignerInformation arg0)
    • getReferenceValidations

      public List<eu.europa.esig.dss.model.ReferenceValidation> getReferenceValidations()
    • getDataToBeSignedRepresentation

      public eu.europa.esig.dss.model.Digest getDataToBeSignedRepresentation()
    • getMessageDigestAlgorithms

      public Set<eu.europa.esig.dss.enumerations.DigestAlgorithm> getMessageDigestAlgorithms()
    • getMessageDigestValue

      public byte[] getMessageDigestValue()
    • getContentType

      public String getContentType()
    • getMimeType

      public String getMimeType()
    • getSignerInformation

      public org.bouncycastle.cms.SignerInformation getSignerInformation()
    • getSignatureValue

      public byte[] getSignatureValue()
    • isCounterSignature

      public boolean isCounterSignature()
    • getCounterSignatureStore

      protected org.bouncycastle.cms.SignerInformationStore getCounterSignatureStore()
    • getDAIdentifier

      public String getDAIdentifier()
    • getSignerInformationStoreInfos

      public Set<eu.europa.esig.dss.spi.x509.SignerIdentifier> getSignerInformationStoreInfos()
    • setSigningCertificateSource

      public void setSigningCertificateSource(eu.europa.esig.dss.spi.x509.CertificateSource arg0)
    • getFilename

      public String getFilename()
    • setFilename

      public void setFilename(String arg0)
    • getDetachedContents

      public List<eu.europa.esig.dss.model.DSSDocument> getDetachedContents()
    • setDetachedContents

      public void setDetachedContents(List<eu.europa.esig.dss.model.DSSDocument> arg0)
    • getContainerContents

      public List<eu.europa.esig.dss.model.DSSDocument> getContainerContents()
    • setContainerContents

      public void setContainerContents(List<eu.europa.esig.dss.model.DSSDocument> arg0)
    • getManifestFile

      public eu.europa.esig.dss.model.ManifestFile getManifestFile()
    • setManifestFile

      public void setManifestFile(eu.europa.esig.dss.model.ManifestFile arg0)
    • getDSSId

      public eu.europa.esig.dss.spi.signature.identifier.SignatureIdentifier getDSSId()
    • getId

      public String getId()
    • getCounterSignaturesCertificateSource

      protected eu.europa.esig.dss.spi.x509.ListCertificateSource getCounterSignaturesCertificateSource()
    • getCounterSignaturesCRLSource

      protected eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.crl.CRL> getCounterSignaturesCRLSource()
    • getCounterSignaturesOCSPSource

      protected eu.europa.esig.dss.spi.x509.revocation.ListRevocationSource<eu.europa.esig.dss.model.x509.revocation.ocsp.OCSP> getCounterSignaturesOCSPSource()
    • resetCertificateSource

      public void resetCertificateSource()
    • resetRevocationSources

      public void resetRevocationSources()
    • resetTimestampSource

      public void resetTimestampSource()
    • getCandidatesForSigningCertificate

      public eu.europa.esig.dss.spi.x509.CandidatesForSigningCertificate getCandidatesForSigningCertificate()
    • initBaselineRequirementsChecker

      public void initBaselineRequirementsChecker(eu.europa.esig.dss.spi.validation.CertificateVerifier arg0)
    • getCertificates

      public List<eu.europa.esig.dss.model.x509.CertificateToken> getCertificates()
    • setMasterSignature

      public void setMasterSignature(eu.europa.esig.dss.spi.signature.AdvancedSignature arg0)
    • getMasterSignature

      public eu.europa.esig.dss.spi.signature.AdvancedSignature getMasterSignature()
    • getSignatureCryptographicVerification

      public eu.europa.esig.dss.model.signature.SignatureCryptographicVerification getSignatureCryptographicVerification()
    • getSignerRoles

      public List<eu.europa.esig.dss.model.signature.SignerRole> getSignerRoles()
    • getSigningCertificateToken

      public eu.europa.esig.dss.model.x509.CertificateToken getSigningCertificateToken()
    • getStructureValidationResult

      public List<String> getStructureValidationResult()
    • validateStructure

      protected List<String> validateStructure()
    • getSignatureScopes

      public List<eu.europa.esig.dss.model.scope.SignatureScope> getSignatureScopes()
    • getContentTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getContentTimestamps()
    • getSignatureTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getSignatureTimestamps()
    • getTimestampsX1

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getTimestampsX1()
    • getTimestampsX2

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getTimestampsX2()
    • getArchiveTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getArchiveTimestamps()
    • getDetachedTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getDetachedTimestamps()
    • getAllTimestamps

      public List<eu.europa.esig.dss.spi.x509.tsp.TimestampToken> getAllTimestamps()
    • getEmbeddedEvidenceRecords

      public List<eu.europa.esig.dss.spi.x509.evidencerecord.EvidenceRecord> getEmbeddedEvidenceRecords()
    • addExternalEvidenceRecord

      public void addExternalEvidenceRecord(eu.europa.esig.dss.spi.x509.evidencerecord.EvidenceRecord arg0)
    • getDetachedEvidenceRecords

      public List<eu.europa.esig.dss.spi.x509.evidencerecord.EvidenceRecord> getDetachedEvidenceRecords()
    • getAllEvidenceRecords

      public List<eu.europa.esig.dss.spi.x509.evidencerecord.EvidenceRecord> getAllEvidenceRecords()
    • getSignaturePolicy

      public eu.europa.esig.dss.model.signature.SignaturePolicy getSignaturePolicy()
    • hasBProfile

      public boolean hasBProfile()
    • hasTProfile

      public boolean hasTProfile()
    • hasLTProfile

      public boolean hasLTProfile()
    • hasLTAProfile

      public boolean hasLTAProfile()
    • hasBESProfile

      public boolean hasBESProfile()
    • hasEPESProfile

      public boolean hasEPESProfile()
    • hasExtendedTProfile

      public boolean hasExtendedTProfile()
    • hasCProfile

      public boolean hasCProfile()
    • hasXProfile

      public boolean hasXProfile()
    • hasXLProfile

      public boolean hasXLProfile()
    • hasERSProfile

      public boolean hasERSProfile()
    • areAllSelfSignedCertificates

      public boolean areAllSelfSignedCertificates()
    • isDocHashOnlyValidation

      public boolean isDocHashOnlyValidation()
    • isHashOnlyValidation

      public boolean isHashOnlyValidation()
    • equals

      public boolean equals(Object arg0)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object