Class JAdESSignature

java.lang.Object
eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
eu.europa.esig.dss.jades.validation.JAdESSignature
All Implemented Interfaces:
eu.europa.esig.dss.model.identifier.IdentifierBasedObject, eu.europa.esig.dss.spi.signature.AdvancedSignature, Serializable

public class JAdESSignature extends eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
Represents the JAdES signature
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

    Constructors
    Constructor
    Description
    Default constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp)
     
    protected eu.europa.esig.dss.model.signature.SignaturePolicy
     
    void
     
    createBaselineRequirementsChecker(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier)
     
    protected List<eu.europa.esig.dss.model.scope.SignatureScope>
     
    eu.europa.esig.dss.spi.SignatureCertificateSource
     
    List<eu.europa.esig.dss.model.signature.SignerRole>
     
    List<eu.europa.esig.dss.model.signature.SignerRole>
     
    List<eu.europa.esig.dss.model.signature.CommitmentTypeIndication>
     
     
    List<eu.europa.esig.dss.spi.signature.AdvancedSignature>
     
    eu.europa.esig.dss.spi.x509.revocation.crl.OfflineCRLSource
     
     
    eu.europa.esig.dss.enumerations.SignatureLevel
     
    eu.europa.esig.dss.model.Digest
     
    eu.europa.esig.dss.enumerations.DigestAlgorithm
     
    eu.europa.esig.dss.enumerations.EncryptionAlgorithm
     
    Returns unsigned properties embedded into the 'etsiU' array
    Gets the associated JWS
    Gets Kid value when present
    Gets a 'cSig' component embedding the current signature
     
    eu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSource
     
    List<eu.europa.esig.dss.model.DSSDocument>
    Returns a list of original documents signed by the signature
    List<eu.europa.esig.dss.model.ReferenceValidation>
     
    eu.europa.esig.dss.enumerations.SigDMechanism
    Returns a mechanism used in 'sigD' to cover a detached content
    eu.europa.esig.dss.enumerations.SignatureAlgorithm
     
    eu.europa.esig.dss.model.signature.SignatureDigestReference
    getSignatureDigestReference(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm)
     
    eu.europa.esig.dss.enumerations.SignatureForm
     
    protected eu.europa.esig.dss.spi.signature.identifier.SignatureIdentifierBuilder
     
    eu.europa.esig.dss.model.SignaturePolicyStore
     
    eu.europa.esig.dss.model.signature.SignatureProductionPlace
     
    Returns value of the "typ" header parameter, declaring the media type of the JWS, when present.
    byte[]
     
    List<eu.europa.esig.dss.model.signature.SignerRole>
     
    List<eu.europa.esig.dss.model.DSSDocument>
    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
    List<eu.europa.esig.dss.model.DSSDocument>
    This method returns a list of documents for ObjectIdByUrl or ObjectIdByUriHash mechanisms Keeps the original order according to 'pars' dictionary content
     
     
    boolean
    Checks if the JAdES Signature is a detached (contains 'sigD' dictionary)
    void
    Sets a 'cSig' component embedding the current signature
    protected List<String>
     

    Methods inherited from class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature

    addExternalEvidenceRecord, areAllSelfSignedCertificates, equals, getAllEvidenceRecords, getAllTimestamps, getArchiveTimestamps, getBaselineRequirementsChecker, getCandidatesForSigningCertificate, getCertificates, getCompleteCertificateSource, getCompleteCRLSource, getCompleteOCSPSource, getContainerContents, getContentTimestamps, getCounterSignaturesCertificateSource, getCounterSignaturesCRLSource, getCounterSignaturesOCSPSource, getDetachedContents, getDetachedEvidenceRecords, getDetachedTimestamps, getDocumentTimestamps, getDSSId, getEmbeddedEvidenceRecords, getFilename, getId, getManifestFile, getMasterSignature, getSignatureCryptographicVerification, getSignaturePolicy, getSignatureScopes, getSignatureTimestamps, getSignerRoles, getSigningCertificateToken, getStructureValidationResult, getTimestampsX1, getTimestampsX2, hasAProfile, hasBESProfile, hasBProfile, hasCProfile, hasEPESProfile, hasERSProfile, hasExtendedTProfile, hashCode, hasLTAProfile, hasLTProfile, hasTProfile, hasXLProfile, hasXProfile, initBaselineRequirementsChecker, isCounterSignature, isDocHashOnlyValidation, isHashOnlyValidation, resetCertificateSource, resetRevocationSources, resetTimestampSource, setContainerContents, setDetachedContents, setFilename, setManifestFile, setMasterSignature, setSigningCertificateSource, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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()
    • 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()
      Specified by:
      buildSignaturePolicy in class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
    • 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()
      Specified by:
      getSignatureIdentifierBuilder in class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
    • 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)
      Specified by:
      createBaselineRequirementsChecker in class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
    • validateStructure

      protected List<String> validateStructure()
      Overrides:
      validateStructure in class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
    • findSignatureScopes

      protected List<eu.europa.esig.dss.model.scope.SignatureScope> findSignatureScopes()
      Specified by:
      findSignatureScopes in class eu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
    • addExternalTimestamp

      public void addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp)