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
FieldsModifier and TypeFieldDescriptionprotected final CertificateVerifierThe offline copy of a CertificateVerifierprotected final ASThe signature object -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaselineRequirementsChecker(AS signature) Constructor withoutCertificateVerifier(to be used for B-level validation only)protectedBaselineRequirementsChecker(AS signature, CertificateVerifier offlineCertificateVerifier) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanThis method verifies whether the signature contains some of the LT-/XL level attributesprotected booleancontainsSigningCertificate(Collection<CertificateToken> certificateTokens) Checks if the given collection ofCertificateTokens contains the signing certificate for the signatureprotected ListCertificateSourceReturns a list of certificate sources with an exception to the last archive timestamp if applicableprotected ValidationContextReturns a validated validation contextabstract booleanChecks if the signature has a corresponding BASELINE-B profileabstract booleanChecks if the signature has a corresponding BASELINE-LTA profileabstract booleanChecks if the signature has a corresponding BASELINE-LT profileabstract booleanChecks if the signature has a corresponding BASELINE-T profilebooleanChecks if the signature has a corresponding *AdES-A profilebooleanChecks if the signature has a corresponding *AdES-BES profilebooleanChecks if the signature has a corresponding *AdES-C profilebooleanChecks if the signature has a corresponding *AdES-EPES profilebooleanChecks if the signature has a corresponding *AdES-T profilebooleanChecks if the signature has a corresponding *AdES-XL profilebooleanChecks if the signature has a corresponding *AdES-X profileprotected booleanChecks if the signature contains a SignaturePolicyIdentifier containing a hash used to digest the signature policybooleanChecks the minimal requirement to satisfy LTA-profile for AdES signaturesbooleanChecks the minimal requirement to satisfy LT-profile for AdES signaturesprotected booleanChecks the minimal requirement to satisfy T-profile for AdES signaturesprotected booleanChecks 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-DefaultAdvancedSignatureto validate
-
BaselineRequirementsChecker
Default constructor- Parameters:
signature-DefaultAdvancedSignatureto validateofflineCertificateVerifier-CertificateVerifieroffline 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 ofCertificateTokens contains the signing certificate for the signature- Parameters:
certificateTokens- a collection ofCertificateTokens- 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
-