Interface EmbeddedEvidenceRecordHelper
- All Known Implementing Classes:
AbstractEmbeddedEvidenceRecordHelper,CAdESEmbeddedEvidenceRecordHelper,XAdESEmbeddedEvidenceRecordHelper
public interface EmbeddedEvidenceRecordHelper
This class contains utility methods required for a processing and validation of an embedded evidence record
-
Method Summary
Modifier and TypeMethodDescriptionGets a list of detached documentsGets the unsigned attribute property embedding the evidence record.Gets a master signature, enveloping the current evidence recordgetMasterSignatureDigest(DigestAlgorithm digestAlgorithm) Builds digest for the embedded evidence record for the givenDigestAlgorithm.getMasterSignatureDigest(DigestAlgorithm digestAlgorithm, boolean derEncoded) Builds digest for the embedded evidence record for the givenDigestAlgorithmusing a specified encoding.Gets position of the evidence record carrying attribute within the signature NOTE: can be null in case of a not yet embedded evidence record.Gets position of the evidence record within its carrying attribute NOTE: can be null in case of a not yet embedded evidence record.booleanGets 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.
-
Method Details
-
getMasterSignature
AdvancedSignature getMasterSignature()Gets a master signature, enveloping the current evidence record- Returns:
AdvancedSignature
-
getEvidenceRecordAttribute
SignatureAttribute getEvidenceRecordAttribute()Gets the unsigned attribute property embedding the evidence record. NOTE: can be null in case of a not yet embedded evidence record.- Returns:
SignatureAttribute
-
getOrderOfAttribute
Integer getOrderOfAttribute()Gets position of the evidence record carrying attribute within the signature NOTE: can be null in case of a not yet embedded evidence record.- Returns:
Integer
-
getOrderWithinAttribute
Integer getOrderWithinAttribute()Gets position of the evidence record within its carrying attribute NOTE: can be null in case of a not yet embedded evidence record.- Returns:
Integer
-
getDetachedContents
List<DSSDocument> getDetachedContents()Gets a list of detached documents- Returns:
- a list of
DSSDocuments
-
getMasterSignatureDigest
Builds digest for the embedded evidence record for the givenDigestAlgorithm. This method uses an existing coding of a signature for hash generation.- Parameters:
digestAlgorithm-DigestAlgorithm- Returns:
Digest
-
getMasterSignatureDigest
Builds digest for the embedded evidence record for the givenDigestAlgorithmusing a specified encoding. The method can be called only for a CAdES signature implementation. NOTE: please use the method#isEncodingSelectionSupportedto check whether the encoding choice is supported by the current implementation. Use#getMasterSignatureDigest(digestAlgorithm)method otherwise.- Parameters:
digestAlgorithm-DigestAlgorithmderEncoded- whether the signature shall be DER-encoded- Returns:
Digest
-
isEncodingSelectionSupported
boolean isEncodingSelectionSupported()Gets 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
boolean isAbsentHashtreeSupported()Gets 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
-