Class CAdESEmbeddedEvidenceRecordHelper
java.lang.Object
eu.europa.esig.dss.spi.validation.evidencerecord.AbstractEmbeddedEvidenceRecordHelper
eu.europa.esig.dss.cades.evidencerecord.CAdESEmbeddedEvidenceRecordHelper
- All Implemented Interfaces:
EmbeddedEvidenceRecordHelper
This class contains common methods for validation of a CAdES embedded evidence record
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.validation.evidencerecord.AbstractEmbeddedEvidenceRecordHelper
evidenceRecordAttribute, signature -
Constructor Summary
ConstructorsConstructorDescriptionCAdESEmbeddedEvidenceRecordHelper(CAdESSignature signature) Constructor for an evidence record applied for the whole signature content (not yet embedded)CAdESEmbeddedEvidenceRecordHelper(CAdESSignature signature, CAdESAttribute evidenceRecordAttribute) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected DSSDocumentGets the detached document covered by a detached CAdESprotected SignatureEvidenceRecordDigestBuildergetDigestBuilder(AdvancedSignature signature, SignatureAttribute evidenceRecordAttribute, DigestAlgorithm digestAlgorithm) Gets implementation of the signature digest builder for the given evidence recordbooleanGets whether the embedded evidence records without the reduced hashtree are supported by the current signature implementation.booleanGets whether the selection of a target encoding is supported by the current implementation.protected voidsetDEREncoding(SignatureEvidenceRecordDigestBuilder digestBuilder, boolean derEncoded) Sets theencodingto be used on the hash computation to theSignatureEvidenceRecordDigestBuilderwhether applicablevoidsetDetachedContents(List<DSSDocument> detachedContents) Sets a list of documents used for validation of a detached signatureMethods inherited from class eu.europa.esig.dss.spi.validation.evidencerecord.AbstractEmbeddedEvidenceRecordHelper
getDetachedContents, getEvidenceRecordAttribute, getMasterSignature, getMasterSignatureDigest, getMasterSignatureDigest, getOrderOfAttribute, getOrderWithinAttribute, setOrderOfAttribute, setOrderWithinAttribute
-
Constructor Details
-
CAdESEmbeddedEvidenceRecordHelper
Constructor for an evidence record applied for the whole signature content (not yet embedded)- Parameters:
signature-CAdESSignature
-
CAdESEmbeddedEvidenceRecordHelper
public CAdESEmbeddedEvidenceRecordHelper(CAdESSignature signature, CAdESAttribute evidenceRecordAttribute) Default constructor- Parameters:
signature-CAdESSignatureevidenceRecordAttribute-CAdESAttribute
-
-
Method Details
-
setDetachedContents
Description copied from class:AbstractEmbeddedEvidenceRecordHelperSets a list of documents used for validation of a detached signature- Overrides:
setDetachedContentsin classAbstractEmbeddedEvidenceRecordHelper- Parameters:
detachedContents- list ofDSSDocuments
-
getDigestBuilder
protected SignatureEvidenceRecordDigestBuilder getDigestBuilder(AdvancedSignature signature, SignatureAttribute evidenceRecordAttribute, DigestAlgorithm digestAlgorithm) Description copied from class:AbstractEmbeddedEvidenceRecordHelperGets implementation of the signature digest builder for the given evidence record- Specified by:
getDigestBuilderin classAbstractEmbeddedEvidenceRecordHelper- Parameters:
signature-AdvancedSignatureevidenceRecordAttribute-SignatureAttributedigestAlgorithm-DigestAlgorithm- Returns:
SignatureEvidenceRecordDigestBuilder
-
getDetachedDocument
Gets the detached document covered by a detached CAdES- Returns:
DSSDocument
-
setDEREncoding
protected void setDEREncoding(SignatureEvidenceRecordDigestBuilder digestBuilder, boolean derEncoded) Description copied from class:AbstractEmbeddedEvidenceRecordHelperSets theencodingto be used on the hash computation to theSignatureEvidenceRecordDigestBuilderwhether applicable- Specified by:
setDEREncodingin classAbstractEmbeddedEvidenceRecordHelper- Parameters:
digestBuilder-SignatureEvidenceRecordDigestBuilderderEncoded- whether signature shall be DER encoded
-
isEncodingSelectionSupported
public boolean isEncodingSelectionSupported()Description copied from interface:EmbeddedEvidenceRecordHelperGets whether the selection of a target encoding is supported by the current implementation. This method is used to resolve the interoperability issues between ETSI TS 119 122-3 and RFC 4998 embedded ERS, requiring hash computation in different ways.- Returns:
- TRUE if the encoding selection is supported by the current implementation, FALSE otherwise
-
isAbsentHashtreeSupported
public boolean isAbsentHashtreeSupported()Description copied from interface:EmbeddedEvidenceRecordHelperGets whether the embedded evidence records without the reduced hashtree are supported by the current signature implementation. This method resolves the difference on processing between CAdES (TS 119 122-3) and XAdES (TS 119 132-3) embedded evidence records, with the CAdES allowing omitted reduced hashtree, while XAdES requiring such.- Returns:
- whether the absent reduced hashtree is supported by the current implementation
-