Package eu.europa.esig.dss.spi.signature
Class BaselineRequirementsChecker<AS extends DefaultAdvancedSignature>
java.lang.Object
eu.europa.esig.dss.spi.signature.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
This method verifies whether the signature contains some of the LT-/XL level attributesprotected 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 profileboolean
Checks if the signature has a corresponding *AdES-A profileboolean
Checks if the signature has a corresponding *AdES-BES profileboolean
Checks if the signature has a corresponding *AdES-C profileboolean
Checks if the signature has a corresponding *AdES-EPES profileboolean
Checks if the signature has a corresponding *AdES-T profileboolean
Checks if the signature has a corresponding *AdES-XL profileboolean
Checks if the signature has a corresponding *AdES-X 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
-
hasExtendedBESProfile
public boolean hasExtendedBESProfile()Checks if the signature has a corresponding *AdES-BES profile- Returns:
- TRUE if the signature has a *AdES-BES profile, FALSE otherwise
-
hasExtendedEPESProfile
public boolean hasExtendedEPESProfile()Checks if the signature has a corresponding *AdES-EPES profile- Returns:
- TRUE if the signature has a *AdES-EPES profile, FALSE otherwise
-
hasExtendedTProfile
public boolean hasExtendedTProfile()Checks if the signature has a corresponding *AdES-T profile- Returns:
- TRUE if the signature has a *AdES-T profile, FALSE otherwise
-
hasExtendedCProfile
public boolean hasExtendedCProfile()Checks if the signature has a corresponding *AdES-C profile- Returns:
- TRUE if the signature has a *AdES-C profile, FALSE otherwise
-
hasExtendedXProfile
public boolean hasExtendedXProfile()Checks if the signature has a corresponding *AdES-X profile- Returns:
- TRUE if the signature has a *AdES-X profile, FALSE otherwise
-
hasExtendedXLProfile
public boolean hasExtendedXLProfile()Checks if the signature has a corresponding *AdES-XL profile- Returns:
- TRUE if the signature has a *AdES-XL profile, FALSE otherwise
-
hasExtendedAProfile
public boolean hasExtendedAProfile()Checks if the signature has a corresponding *AdES-A profile- Returns:
- TRUE if the signature has a *AdES-A 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
-
containsLTLevelCertificates
protected boolean containsLTLevelCertificates()This method verifies whether the signature contains some of the LT-/XL level attributes- Returns:
- TRUE if the signature contains LT-/XL- level attributes, 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
-