Package eu.europa.esig.dss.validation
Class BaselineRequirementsChecker<AS extends DefaultAdvancedSignature>
java.lang.Object
eu.europa.esig.dss.validation.BaselineRequirementsChecker<AS>
- Type Parameters:
AS
-DefaultAdvancedSignature
- Direct Known Subclasses:
CAdESBaselineRequirementsChecker
,JAdESBaselineRequirementsChecker
,XAdESBaselineRequirementsChecker
public abstract class BaselineRequirementsChecker<AS extends DefaultAdvancedSignature>
extends Object
Checks conformance of a signature to the requested baseline format
-
Field Summary
Modifier and TypeFieldDescriptionprotected final CertificateVerifier
The offline copy of a CertificateVerifierprotected final AS
The signature object -
Constructor Summary
ModifierConstructorDescriptionprotected
BaselineRequirementsChecker
(AS signature) Constructor withoutCertificateVerifier
(to be used for B-level validation only)protected
BaselineRequirementsChecker
(AS signature, CertificateVerifier offlineCertificateVerifier) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
containsSigningCertificate
(Collection<CertificateToken> certificateTokens) Checks if the given collection ofCertificateToken
s contains the signing certificate for the signatureprotected ListCertificateSource
Returns a list of certificate sources with an exception to the last archive timestamp if applicableprotected ValidationContext
Returns a validated validation contextabstract boolean
Checks if the signature has a corresponding BASELINE-B profileabstract boolean
Checks if the signature has a corresponding BASELINE-LTA profileabstract boolean
Checks if the signature has a corresponding BASELINE-LT profileabstract boolean
Checks if the signature has a corresponding BASELINE-T profileprotected boolean
Checks if the signature contains a SignaturePolicyIdentifier containing a hash used to digest the signature policyboolean
Checks the minimal requirement to satisfy LTA-profile for AdES signaturesboolean
Checks the minimal requirement to satisfy LT-profile for AdES signaturesprotected boolean
Checks the minimal requirement to satisfy T-profile for AdES signaturesprotected boolean
Checks whether signature timestamps have been created before expiration of the signing-certificate used to create the signature
-
Field Details
-
signature
The signature object -
offlineCertificateVerifier
The offline copy of a CertificateVerifier
-
-
Constructor Details
-
BaselineRequirementsChecker
Constructor withoutCertificateVerifier
(to be used for B-level validation only)- Parameters:
signature
-DefaultAdvancedSignature
to validate
-
BaselineRequirementsChecker
Default constructor- Parameters:
signature
-DefaultAdvancedSignature
to validateofflineCertificateVerifier
-CertificateVerifier
offline copy of a used CertificateVerifier
-
-
Method Details
-
hasBaselineBProfile
public abstract boolean hasBaselineBProfile()Checks if the signature has a corresponding BASELINE-B profile- Returns:
- TRUE if the signature has a BASELINE-B profile, FALSE otherwise
-
hasBaselineTProfile
public abstract boolean hasBaselineTProfile()Checks if the signature has a corresponding BASELINE-T profile- Returns:
- TRUE if the signature has a BASELINE-T profile, FALSE otherwise
-
hasBaselineLTProfile
public abstract boolean hasBaselineLTProfile()Checks if the signature has a corresponding BASELINE-LT profile- Returns:
- TRUE if the signature has a BASELINE-LT profile, FALSE otherwise
-
hasBaselineLTAProfile
public abstract boolean hasBaselineLTAProfile()Checks if the signature has a corresponding BASELINE-LTA profile- Returns:
- TRUE if the signature has a BASELINE-LTA profile, FALSE otherwise
-
signatureTimestampsCreatedBeforeSignCertExpiration
protected boolean signatureTimestampsCreatedBeforeSignCertExpiration()Checks whether signature timestamps have been created before expiration of the signing-certificate used to create the signature- Returns:
- TRUE if the available signature-time-stamps have been created before expiration of the signing certificate, FALSE otherwise
-
minimalTRequirement
protected boolean minimalTRequirement()Checks the minimal requirement to satisfy T-profile for AdES signatures- Returns:
- TRUE if the signature has a T-profile, FALSE otherwise
-
minimalLTRequirement
public boolean minimalLTRequirement()Checks the minimal requirement to satisfy LT-profile for AdES signatures- Returns:
- TRUE if the signature has an LT-profile, FALSE otherwise
-
getCertificateSourcesExceptLastArchiveTimestamp
Returns a list of certificate sources with an exception to the last archive timestamp if applicable- Returns:
ListCertificateSource
-
getValidationContext
Returns a validated validation context- Returns:
ValidationContext
-
minimalLTARequirement
public boolean minimalLTARequirement()Checks the minimal requirement to satisfy LTA-profile for AdES signatures- Returns:
- TRUE if the signature has an LTA-profile, FALSE otherwise
-
containsSigningCertificate
Checks if the given collection ofCertificateToken
s contains the signing certificate for the signature- Parameters:
certificateTokens
- a collection ofCertificateToken
s- Returns:
- TRUE if the given collection of certificate contains teh signing certificate, FALSE otherwise
-
isSignaturePolicyIdentifierHashPresent
protected boolean isSignaturePolicyIdentifierHashPresent()Checks if the signature contains a SignaturePolicyIdentifier containing a hash used to digest the signature policy- Returns:
- TRUE if the SignaturePolicyIdentifier hash is present, FALSE otherwise
-