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 String
buildStringMessage(I18nProvider i18nProvider, MessageTag messageTag, Object... args)
Builds a String message from the providedmessageTag
static MessageTag
getCertificateChainCryptoPosition(Context context)
Returns the message tag for the certificate chain of the given contextstatic MessageTag
getCryptoPosition(Context context)
Returns the message tag for the given context (signature creation,...)static MessageTag
getDigestMatcherCryptoPosition(XmlDigestMatcher digestMatcher)
Returns crypto possition MessageTag for the given XmlDigestMatcherstatic String
getFormattedDate(Date date)
Returns a formatted String representation of a given Datestatic CertificateRevocationWrapper
getLatestAcceptableRevocationData(CertificateWrapper certificate, XmlBasicBuildingBlocks bbb)
Returns a revocation data used for basic signature validationstatic 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 Datastatic 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.
-
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
-CertificateWrapper
to checkcontrolTime
-Date
validation 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
-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 forbbb
-XmlBasicBuildingBlocks
validation 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
-I18nProvider
to build a messagemessageTag
-MessageTag
defining 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
-XmlDigestMatcher
to get crypto position for- Returns:
MessageTag
position
-