Class XAdESEmbeddedEvidenceRecordHelper
java.lang.Object
eu.europa.esig.dss.spi.validation.evidencerecord.AbstractEmbeddedEvidenceRecordHelper
eu.europa.esig.dss.xades.evidencerecord.XAdESEmbeddedEvidenceRecordHelper
- All Implemented Interfaces:
EmbeddedEvidenceRecordHelper
This class contains common methods for validation of a XAdES embedded evidence record
-
Field Summary
Fields inherited from class eu.europa.esig.dss.spi.validation.evidencerecord.AbstractEmbeddedEvidenceRecordHelper
evidenceRecordAttribute, signature -
Constructor Summary
ConstructorsConstructorDescriptionXAdESEmbeddedEvidenceRecordHelper(XAdESSignature signature) Constructor for an evidence record applied for the whole signature content (not yet embedded)XAdESEmbeddedEvidenceRecordHelper(XAdESSignature signature, XAdESAttribute evidenceRecordAttribute) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 applicableMethods inherited from class eu.europa.esig.dss.spi.validation.evidencerecord.AbstractEmbeddedEvidenceRecordHelper
getDetachedContents, getEvidenceRecordAttribute, getMasterSignature, getMasterSignatureDigest, getMasterSignatureDigest, getOrderOfAttribute, getOrderWithinAttribute, setDetachedContents, setOrderOfAttribute, setOrderWithinAttribute
-
Constructor Details
-
XAdESEmbeddedEvidenceRecordHelper
Constructor for an evidence record applied for the whole signature content (not yet embedded)- Parameters:
signature-XAdESSignature
-
XAdESEmbeddedEvidenceRecordHelper
public XAdESEmbeddedEvidenceRecordHelper(XAdESSignature signature, XAdESAttribute evidenceRecordAttribute) Default constructor- Parameters:
signature-XAdESSignatureevidenceRecordAttribute-XAdESAttribute
-
-
Method Details
-
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
-
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
-