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 Details

    • signature

      protected final AS extends DefaultAdvancedSignature signature
      The signature object
    • offlineCertificateVerifier

      protected final CertificateVerifier offlineCertificateVerifier
      The offline copy of a CertificateVerifier
  • Constructor Details

    • BaselineRequirementsChecker

      protected BaselineRequirementsChecker(AS signature)
      Constructor without CertificateVerifier (to be used for B-level validation only)
      Parameters:
      signature - DefaultAdvancedSignature to validate
    • BaselineRequirementsChecker

      protected BaselineRequirementsChecker(AS signature, CertificateVerifier offlineCertificateVerifier)
      Default constructor
      Parameters:
      signature - DefaultAdvancedSignature to validate
      offlineCertificateVerifier - 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

      protected ListCertificateSource getCertificateSourcesExceptLastArchiveTimestamp()
      Returns a list of certificate sources with an exception to the last archive timestamp if applicable
      Returns:
      ListCertificateSource
    • getValidationContext

      protected ValidationContext 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

      protected boolean containsSigningCertificate(Collection<CertificateToken> certificateTokens)
      Checks if the given collection of CertificateTokens contains the signing certificate for the signature
      Parameters:
      certificateTokens - a collection of CertificateTokens
      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