Class ValidationProcessUtils

java.lang.Object
eu.europa.esig.dss.validation.process.ValidationProcessUtils

public class ValidationProcessUtils
extends Object
Contains utils for a validation process
  • Constructor Details

    • ValidationProcessUtils

      public ValidationProcessUtils()
  • Method Details

    • isRevocationCheckRequired

      public static boolean isRevocationCheckRequired​(CertificateWrapper certificate, Date controlTime)
      Verifies if the revocation check is required for the OCSP Responder's certificate RFC 2560 : 4.2.2.2.1 Revocation Checking of an Authorized Responder A CA may specify that an OCSP client can trust a responder for the lifetime of the responder's certificate. The CA does so by including the extension id-pkix-ocsp-nocheck.
      Parameters:
      certificate - CertificateWrapper to check
      controlTime - Date validation time
      Returns:
      TRUE if the revocation check is required for the OCSP Responder certificate, FALSE otherwise
    • isAllowedBasicSignatureValidation

      public static boolean isAllowedBasicSignatureValidation​(XmlConclusion conclusion)
      Checks if the given conclusion is allowed as a basic signature validation in order to continue the validation process with Long-Term Validation Data
      Parameters:
      conclusion - XmlConclusion to validate
      Returns:
      TRUE if the result is allowed to continue the validation process, FALSE otherwise
    • getLatestAcceptableRevocationData

      public static CertificateRevocationWrapper getLatestAcceptableRevocationData​(CertificateWrapper certificate, XmlBasicBuildingBlocks bbb)
      Returns a revocation data used for basic signature validation
      Parameters:
      certificate - CertificateWrapper to get a latest applicable revocation data for
      bbb - XmlBasicBuildingBlocks validation of a token
      Returns:
      CertificateRevocationWrapper
    • getFormattedDate

      public static String getFormattedDate​(Date date)
      Returns a formatted String representation of a given Date
      Parameters:
      date - Date to be pretty-printed
      Returns:
      String formatted date
    • buildStringMessage

      public static String buildStringMessage​(I18nProvider i18nProvider, MessageTag messageTag, Object... args)
      Builds a String message from the provided messageTag
      Parameters:
      i18nProvider - I18nProvider to build a message
      messageTag - MessageTag defining the message to be build
      args - the arguments to fill the message
      Returns:
      final message String
    • getCryptoPosition

      public static MessageTag getCryptoPosition​(Context context)
      Returns the message tag for the given context (signature creation,...)
      Parameters:
      context - the context
      Returns:
      the related message tag
    • getCertificateChainCryptoPosition

      public static MessageTag getCertificateChainCryptoPosition​(Context context)
      Returns the message tag for the certificate chain of the given context
      Parameters:
      context - the context
      Returns:
      the related message tag
    • getDigestMatcherCryptoPosition

      public static MessageTag getDigestMatcherCryptoPosition​(XmlDigestMatcher digestMatcher)
      Returns crypto possition MessageTag for the given XmlDigestMatcher
      Parameters:
      digestMatcher - XmlDigestMatcher to get crypto position for
      Returns:
      MessageTag position