Class ValidationProcessUtils
java.lang.Object
eu.europa.esig.dss.validation.process.ValidationProcessUtils
public class ValidationProcessUtils extends Object
Contains utils for a validation process
-
Constructor Summary
Constructors Constructor Description ValidationProcessUtils() -
Method Summary
Modifier and Type Method Description static StringbuildStringMessage(I18nProvider i18nProvider, MessageTag messageTag, Object... args)Builds a String message from the providedmessageTagstatic MessageTaggetCertificateChainCryptoPosition(Context context)Returns the message tag for the certificate chain of the given contextstatic MessageTaggetCryptoPosition(Context context)Returns the message tag for the given context (signature creation,...)static MessageTaggetDigestMatcherCryptoPosition(XmlDigestMatcher digestMatcher)Returns crypto possition MessageTag for the given XmlDigestMatcherstatic StringgetFormattedDate(Date date)Returns a formatted String representation of a given Datestatic CertificateRevocationWrappergetLatestAcceptableRevocationData(CertificateWrapper certificate, XmlBasicBuildingBlocks bbb)Returns a revocation data used for basic signature validationstatic booleanisAllowedBasicSignatureValidation(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 Datastatic booleanisRevocationCheckRequired(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.
-
Constructor Details
-
ValidationProcessUtils
public ValidationProcessUtils()
-
-
Method Details
-
isRevocationCheckRequired
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-CertificateWrapperto checkcontrolTime-Datevalidation time- Returns:
- TRUE if the revocation check is required for the OCSP Responder certificate, FALSE otherwise
-
isAllowedBasicSignatureValidation
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-XmlConclusionto 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-CertificateWrapperto get a latest applicable revocation data forbbb-XmlBasicBuildingBlocksvalidation of a token- Returns:
CertificateRevocationWrapper
-
getFormattedDate
Returns a formatted String representation of a given Date -
buildStringMessage
public static String buildStringMessage(I18nProvider i18nProvider, MessageTag messageTag, Object... args)Builds a String message from the providedmessageTag- Parameters:
i18nProvider-I18nProviderto build a messagemessageTag-MessageTagdefining the message to be buildargs- the arguments to fill the message- Returns:
- final message
String
-
getCryptoPosition
Returns the message tag for the given context (signature creation,...)- Parameters:
context- the context- Returns:
- the related message tag
-
getCertificateChainCryptoPosition
Returns the message tag for the certificate chain of the given context- Parameters:
context- the context- Returns:
- the related message tag
-
getDigestMatcherCryptoPosition
Returns crypto possition MessageTag for the given XmlDigestMatcher- Parameters:
digestMatcher-XmlDigestMatcherto get crypto position for- Returns:
MessageTagposition
-