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 -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp) protected eu.europa.esig.dss.model.signature.SignaturePolicyvoidprotected JAdESBaselineRequirementsCheckercreateBaselineRequirementsChecker(eu.europa.esig.dss.spi.validation.CertificateVerifier certificateVerifier) protected List<eu.europa.esig.dss.model.scope.SignatureScope> eu.europa.esig.dss.spi.SignatureCertificateSourceList<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.OfflineCRLSourceeu.europa.esig.dss.enumerations.SignatureLeveleu.europa.esig.dss.model.Digesteu.europa.esig.dss.enumerations.DigestAlgorithmeu.europa.esig.dss.enumerations.EncryptionAlgorithmReturns unsigned properties embedded into the 'etsiU' arraygetJws()Gets the associatedJWSgetKid()Gets Kid value when presentGets a 'cSig' component embedding the current signatureeu.europa.esig.dss.spi.x509.revocation.ocsp.OfflineOCSPSourceList<eu.europa.esig.dss.model.DSSDocument> Returns a list of original documents signed by the signatureList<eu.europa.esig.dss.model.ReferenceValidation> eu.europa.esig.dss.enumerations.SigDMechanismReturns a mechanism used in 'sigD' to cover a detached contenteu.europa.esig.dss.enumerations.SignatureAlgorithmeu.europa.esig.dss.model.signature.SignatureDigestReferencegetSignatureDigestReference(eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm) eu.europa.esig.dss.enumerations.SignatureFormprotected eu.europa.esig.dss.spi.signature.identifier.SignatureIdentifierBuildereu.europa.esig.dss.model.SignaturePolicyStoreeu.europa.esig.dss.model.signature.SignatureProductionPlaceReturns 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 mechanismList<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 contentbooleanChecks if the JAdES Signature is a detached (contains 'sigD' dictionary)voidsetMasterCSigComponent(EtsiUComponent masterCSigComponent) Sets a 'cSig' component embedding the current signatureMethods 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
-
Constructor Details
-
JAdESSignature
Default constructor- Parameters:
jws-JWS
-
-
Method Details
-
getJws
Gets the associatedJWS- 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
-
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
Gets a 'cSig' component embedding the current signature- Returns:
EtsiUComponent'cSig' embedding the current signature
-
setMasterCSigComponent
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
-
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
-
getMimeType
-
getSignatureType
Returns value of the "typ" header parameter, declaring the media type of the JWS, when present.- Returns:
String
-
getCertifiedSignerRoles
-
getClaimedSignerRoles
-
getSignedAssertions
-
getCounterSignatures
-
getDAIdentifier
-
buildSignaturePolicy
protected eu.europa.esig.dss.model.signature.SignaturePolicy buildSignaturePolicy()- Specified by:
buildSignaturePolicyin classeu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
-
getSignatureValue
public byte[] getSignatureValue() -
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:
getSignatureIdentifierBuilderin classeu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
-
checkSignatureIntegrity
public void checkSignatureIntegrity() -
getReferenceValidations
-
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
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
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
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:
createBaselineRequirementsCheckerin classeu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
-
validateStructure
- Overrides:
validateStructurein classeu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
-
findSignatureScopes
- Specified by:
findSignatureScopesin classeu.europa.esig.dss.spi.signature.DefaultAdvancedSignature
-
addExternalTimestamp
public void addExternalTimestamp(eu.europa.esig.dss.spi.x509.tsp.TimestampToken timestamp)
-