public class SignatureValidationProperties extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SignatureValidationProperties.OnlineFetching
Enum representing possible online fetching permissions.
|
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_CONTINUE_AFTER_FAILURE |
static Duration |
DEFAULT_FRESHNESS_HISTORICAL |
static Duration |
DEFAULT_FRESHNESS_PRESENT_CRL |
static Duration |
DEFAULT_FRESHNESS_PRESENT_OCSP |
static SignatureValidationProperties.OnlineFetching |
DEFAULT_ONLINE_FETCHING |
| Constructor and Description |
|---|
SignatureValidationProperties()
Create
SignatureValidationProperties with default values. |
| Modifier and Type | Method and Description |
|---|---|
SignatureValidationProperties |
addCrlClient(ICrlClient crlClient)
Adds new
ICrlClient instance which will be used to retrieve CRL responses during the validation. |
SignatureValidationProperties |
addOcspClient(IOcspClient ocspClient)
Adds new
IOcspClient instance which will be used to retrieve OCSP response during the validation. |
SignatureValidationProperties |
addRequiredExtensions(CertificateSources certificateSources,
List<CertificateExtension> requiredExtensions)
Adds list of extensions which are required to be set to a certificate depending on certificate source.
|
boolean |
getContinueAfterFailure(ValidationContext validationContext)
Returns the Continue after failure setting for the provided context or the default context.
|
List<ICrlClient> |
getCrlClients()
Gets all
ICrlClient instances which will be used to retrieve CRL responses during the validation. |
Duration |
getFreshness(ValidationContext validationContext)
Returns the freshness setting for the provided validation context or the default context
in milliseconds.
|
List<IOcspClient> |
getOcspClients()
Gets all
IOcspClient instances which will be used to retrieve OCSP responses during the validation. |
List<CertificateExtension> |
getRequiredExtensions(ValidationContext validationContext)
Returns required extension for the provided validation context.
|
SignatureValidationProperties.OnlineFetching |
getRevocationOnlineFetching(ValidationContext validationContext)
Sets the onlineFetching property representing possible online fetching permissions.
|
SignatureValidationProperties |
setContinueAfterFailure(ValidatorContexts validatorContexts,
CertificateSources certificateSources,
boolean value)
Sets the Continue after failure setting for the provided context.
|
SignatureValidationProperties |
setFreshness(ValidatorContexts validatorContexts,
CertificateSources certificateSources,
TimeBasedContexts timeBasedContexts,
Duration value)
Sets the freshness setting for the specified validator,
time based and certificate source contexts in milliseconds.
|
SignatureValidationProperties |
setRequiredExtensions(CertificateSources certificateSources,
List<CertificateExtension> requiredExtensions)
Sets list of extensions which are required to be set to a certificate depending on certificate source.
|
SignatureValidationProperties |
setRevocationOnlineFetching(ValidatorContexts validatorContexts,
CertificateSources certificateSources,
TimeBasedContexts timeBasedContexts,
SignatureValidationProperties.OnlineFetching onlineFetching)
Sets the onlineFetching property representing possible online fetching permissions.
|
public static final boolean DEFAULT_CONTINUE_AFTER_FAILURE
public static final Duration DEFAULT_FRESHNESS_PRESENT_CRL
public static final Duration DEFAULT_FRESHNESS_PRESENT_OCSP
public static final Duration DEFAULT_FRESHNESS_HISTORICAL
public static final SignatureValidationProperties.OnlineFetching DEFAULT_ONLINE_FETCHING
public SignatureValidationProperties()
SignatureValidationProperties with default values.public Duration getFreshness(ValidationContext validationContext)
validationContext - the validation context for which to retrieve the freshness settingpublic final SignatureValidationProperties setFreshness(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, Duration value)
This parameter specifies how old revocation data can be, compared to validation time, in order to be trustworthy.
validatorContexts - the validators for which to apply the settingcertificateSources - the certificate sources totimeBasedContexts - the date comparison context for which to apply the settingvalue - the settings value in millisecondsSignatureValidationProperties instance.public boolean getContinueAfterFailure(ValidationContext validationContext)
validationContext - the context for which to retrieve the Continue after failure settingpublic final SignatureValidationProperties setContinueAfterFailure(ValidatorContexts validatorContexts, CertificateSources certificateSources, boolean value)
This parameter specifies if validation is expected to continue after first failure is encountered.
Only ValidationReport.ValidationResult.INVALID is considered to be a failure.
validatorContexts - the validators for which to set the Continue after failure settingcertificateSources - the certificateSources for which to set the Continue after failure settingvalue - the Continue after failure settingSignatureValidationProperties instance.public SignatureValidationProperties.OnlineFetching getRevocationOnlineFetching(ValidationContext validationContext)
validationContext - the context for which to retrieve the online fetching settingpublic final SignatureValidationProperties setRevocationOnlineFetching(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, SignatureValidationProperties.OnlineFetching onlineFetching)
validatorContexts - the validators for which to set this valuecertificateSources - the certificate source for which to set this valuetimeBasedContexts - time perspective context, at which validation is happeningonlineFetching - onlineFetching property value to setSignatureValidationProperties instance.public List<CertificateExtension> getRequiredExtensions(ValidationContext validationContext)
validationContext - the validation context for which to retrieve required extensionspublic final SignatureValidationProperties setRequiredExtensions(CertificateSources certificateSources, List<CertificateExtension> requiredExtensions)
By default, required extensions are set to be compliant with common validation norms. Changing those can result in falsely positive validation result.
certificateSources - CertificateSource for extensions to be presentrequiredExtensions - list of required CertificateExtensionSignatureValidationProperties instancepublic final SignatureValidationProperties addRequiredExtensions(CertificateSources certificateSources, List<CertificateExtension> requiredExtensions)
By default, required extensions are set to be compliant with common validation norms. Changing those can result in falsely positive validation result.
certificateSources - CertificateSource for extensions to be presentrequiredExtensions - list of required CertificateExtensionSignatureValidationProperties instancepublic List<ICrlClient> getCrlClients()
ICrlClient instances which will be used to retrieve CRL responses during the validation.ICrlClient instances which will be used to retrieve CRL responses during the validationpublic final SignatureValidationProperties addCrlClient(ICrlClient crlClient)
ICrlClient instance which will be used to retrieve CRL responses during the validation.crlClient - ICrlClient instance which will be used to retrieve CRL responses during the validationSignatureValidationProperties instancepublic List<IOcspClient> getOcspClients()
IOcspClient instances which will be used to retrieve OCSP responses during the validation.IOcspClient instances which will be used to retrieve OCSP responses during the validationpublic final SignatureValidationProperties addOcspClient(IOcspClient ocspClient)
IOcspClient instance which will be used to retrieve OCSP response during the validation.ocspClient - IOcspClient instance which will be used to retrieve OCSP response during the validationSignatureValidationProperties instanceCopyright © 1998–2025 Apryse Group NV. All rights reserved.