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 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
    • 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
    • hasExtendedERSProfile

      public boolean hasExtendedERSProfile()
      Checks if the signature has a corresponding *AdES-E-ERS profile
      Returns:
      TRUE if the signature has an *AdES-E-ERS 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

      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