Class JAdESSignature

java.lang.Object
eu.europa.esig.dss.jades.validation.JAdESSignature
All Implemented Interfaces:
Serializable

public class JAdESSignature extends Object
Represents the JAdES signature
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

    • JAdESSignature

      public JAdESSignature(JWS jws)
      Default constructor
      Parameters:
      jws - JWS
  • Method Details

    • getJws

      public JWS getJws()
      Gets the associated JWS
      Returns:
      JWS
    • getSignatureForm

      public eu.europa.esig.dss.enumerations.SignatureForm getSignatureForm()
    • getSignatureAlgorithm

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

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

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

      public Date getSigningTime()
    • getExpirationTime

      public Date getExpirationTime()
      This method returns a value of 'exp' protected header, when defined. The field is used within ETSI TS 119 411-5 TLS Certificate Binding signatures and contains the expiry date of the binding. The maximum effective expiry time is whichever is soonest of this field, the longest-lived TLS certificate identified in the sigD member payload, or the notAfter time of the signing certificate. The value shall be encoded as specified in IETF RFC 7519.
      Returns:
      Date
    • isDetachedSignature

      public boolean isDetachedSignature()
      Checks if the JAdES Signature is a detached (contains 'sigD' dictionary)
      Returns:
      TRUE if the signature is detached, FALSE otherwise
    • getMasterCSigComponent

      public EtsiUComponent getMasterCSigComponent()
      Gets a 'cSig' component embedding the current signature
      Returns:
      EtsiUComponent 'cSig' embedding the current signature
    • setMasterCSigComponent

      public void setMasterCSigComponent(EtsiUComponent masterCSigComponent)
      Sets a 'cSig' component embedding the current signature
      Parameters:
      masterCSigComponent - Object 'cSig' embedding the current signature
    • 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()
    • getTimestampSource

      public JAdESTimestampSource getTimestampSource()
    • getSignatureProductionPlace

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

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

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

      public String getContentType()
    • getMimeType

      public String getMimeType()
    • getSignatureType

      public String getSignatureType()
      Returns value of the "typ" header parameter, declaring the media type of the JWS, when present.
      Returns:
      String
    • getCertifiedSignerRoles

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

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

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

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

      public String getDAIdentifier()
    • buildSignaturePolicy

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

      public byte[] getSignatureValue()
    • getEtsiUHeader

      public JAdESEtsiUHeader getEtsiUHeader()
      Returns unsigned properties embedded into the 'etsiU' array
      Returns:
      JAdESEtsiUHeader
    • getSignatureDigestReference

      public eu.europa.esig.dss.model.signature.SignatureDigestReference getSignatureDigestReference(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)
    • getDataToBeSignedRepresentation

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

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

      public void checkSignatureIntegrity()
    • getReferenceValidations

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

      public String getKid()
      Gets Kid value when present
      Returns:
      String
    • getSigDMechanism

      public eu.europa.esig.dss.enumerations.SigDMechanism getSigDMechanism()
      Returns a mechanism used in 'sigD' to cover a detached content
      Returns:
      SigDMechanism
    • getSignedDocumentsByHTTPHeaderName

      public List<eu.europa.esig.dss.model.DSSDocument> getSignedDocumentsByHTTPHeaderName()
      Returns a list of signed documents by the list of URIs present in 'sigD' Keeps the original order according to 'pars' dictionary content Used in HTTPHeaders detached signature mechanism
      Returns:
      a list of DSSDocuments
    • getSignedDocumentsForObjectIdByUriMechanism

      public List<eu.europa.esig.dss.model.DSSDocument> getSignedDocumentsForObjectIdByUriMechanism()
      This method returns a list of documents for ObjectIdByUrl or ObjectIdByUriHash mechanisms Keeps the original order according to 'pars' dictionary content
      Returns:
      a list of DSSDocuments
    • getOriginalDocuments

      public List<eu.europa.esig.dss.model.DSSDocument> getOriginalDocuments()
      Returns a list of original documents signed by the signature
      Returns:
      a list of DSSDocuments
    • getDataFoundUpToLevel

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

      protected JAdESBaselineRequirementsChecker createBaselineRequirementsChecker(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier)
    • validateStructure

      protected List<String> validateStructure()
    • findSignatureScopes

      protected List<eu.europa.esig.dss.model.scope.SignatureScope> findSignatureScopes()
    • addExternalTimestamp

      public void addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp)
    • 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()
    • 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()
    • 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()
    • isCounterSignature

      public boolean isCounterSignature()
    • 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()
    • 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()
    • getDocumentTimestamps

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

      protected eu.europa.esig.dss.spi.signature.BaselineRequirementsChecker getBaselineRequirementsChecker()
    • 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()
    • hasAProfile

      public boolean hasAProfile()
    • 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