Class SignatureValidationProperties
- Namespace
- iText.Signatures.Validation.V1
- Assembly
- itext.sign.dll
Class which stores properties, which are related to signature validation process.
public class SignatureValidationProperties
- Inheritance
-
SignatureValidationProperties
- Inherited Members
Constructors
SignatureValidationProperties()
Create SignatureValidationProperties with default values.
public SignatureValidationProperties()
Fields
DEFAULT_CONTINUE_AFTER_FAILURE
public const bool DEFAULT_CONTINUE_AFTER_FAILURE = true
Field Value
DEFAULT_FRESHNESS_HISTORICAL
public static readonly TimeSpan DEFAULT_FRESHNESS_HISTORICAL
Field Value
DEFAULT_FRESHNESS_PRESENT_CRL
public static readonly TimeSpan DEFAULT_FRESHNESS_PRESENT_CRL
Field Value
DEFAULT_FRESHNESS_PRESENT_OCSP
public static readonly TimeSpan DEFAULT_FRESHNESS_PRESENT_OCSP
Field Value
DEFAULT_ONLINE_FETCHING
public static readonly SignatureValidationProperties.OnlineFetching DEFAULT_ONLINE_FETCHING
Field Value
Methods
AddCrlClient(ICrlClient)
Adds new ICrlClient instance which will be used to retrieve CRL responses during the validation.
public SignatureValidationProperties AddCrlClient(ICrlClient crlClient)
Parameters
crlClient
ICrlClientICrlClient instance which will be used to retrieve CRL responses during the validation
Returns
- SignatureValidationProperties
this same SignatureValidationProperties instance
AddOcspClient(IOcspClient)
Adds new IOcspClient instance which will be used to retrieve OCSP response during the validation.
public SignatureValidationProperties AddOcspClient(IOcspClient ocspClient)
Parameters
ocspClient
IOcspClientIOcspClient instance which will be used to retrieve OCSP response during the validation
Returns
- SignatureValidationProperties
this same SignatureValidationProperties instance
GetContinueAfterFailure(ValidationContext)
Returns the Continue after failure setting for the provided context or the default context.
public virtual bool GetContinueAfterFailure(ValidationContext validationContext)
Parameters
validationContext
ValidationContextthe context for which to retrieve the Continue after failure setting
Returns
- bool
the Continue after failure setting for the provided context or the default context
GetCrlClients()
Gets all ICrlClient instances which will be used to retrieve CRL responses during the validation.
public virtual IList<ICrlClient> GetCrlClients()
Returns
- IList<ICrlClient>
all ICrlClient instances which will be used to retrieve CRL responses during the validation
GetFreshness(ValidationContext)
Returns the freshness setting for the provided validation context or the default context in milliseconds.
public virtual TimeSpan GetFreshness(ValidationContext validationContext)
Parameters
validationContext
ValidationContextthe validation context for which to retrieve the freshness setting
Returns
- TimeSpan
the freshness setting for the provided validation context or the default context in milliseconds
GetOcspClients()
Gets all IOcspClient instances which will be used to retrieve OCSP responses during the validation.
public virtual IList<IOcspClient> GetOcspClients()
Returns
- IList<IOcspClient>
all IOcspClient instances which will be used to retrieve OCSP responses during the validation
GetRequiredExtensions(ValidationContext)
Returns required extension for the provided validation context.
public virtual IList<CertificateExtension> GetRequiredExtensions(ValidationContext validationContext)
Parameters
validationContext
ValidationContextthe validation context for which to retrieve required extensions
Returns
- IList<CertificateExtension>
required extensions for the provided validation context
GetRevocationOnlineFetching(ValidationContext)
Sets the onlineFetching property representing possible online fetching permissions.
public virtual SignatureValidationProperties.OnlineFetching GetRevocationOnlineFetching(ValidationContext validationContext)
Parameters
validationContext
ValidationContextthe context for which to retrieve the online fetching setting
Returns
- SignatureValidationProperties.OnlineFetching
the online fetching setting.
SetContinueAfterFailure(ValidatorContexts, CertificateSources, bool)
Sets the Continue after failure setting for the provided context.
This parameter specifies if validation is expected to continue after first failure is encountered.
Only
public SignatureValidationProperties SetContinueAfterFailure(ValidatorContexts validatorContexts, CertificateSources certificateSources, bool value)
Parameters
validatorContexts
ValidatorContextsthe validators for which to set the Continue after failure setting
certificateSources
CertificateSourcesthe certificateSources for which to set the Continue after failure setting
value
boolthe Continue after failure setting
Returns
- SignatureValidationProperties
this same SignatureValidationProperties instance.
SetFreshness(ValidatorContexts, CertificateSources, TimeBasedContexts, TimeSpan)
Sets the freshness setting for the specified validator, time based and certificate source contexts in milliseconds. This parameter specifies how old revocation data can be, compared to validation time, in order to be trustworthy.
public SignatureValidationProperties SetFreshness(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, TimeSpan value)
Parameters
validatorContexts
ValidatorContextsthe validators for which to apply the setting
certificateSources
CertificateSourcesthe certificate sources to
timeBasedContexts
TimeBasedContextsthe date comparison context for which to apply the setting
value
TimeSpanthe settings value in milliseconds
Returns
- SignatureValidationProperties
this same SignatureValidationProperties instance.
SetRequiredExtensions(CertificateSources, IList<CertificateExtension>)
Set list of extensions which are required to be set to a certificate depending on certificate source.
By default, required extensions are set to be compliant with common validation norms. Changing those can result in falsely positive validation result.public SignatureValidationProperties SetRequiredExtensions(CertificateSources certificateSources, IList<CertificateExtension> requiredExtensions)
Parameters
certificateSources
CertificateSourcesCertificateSource for extensions to be present
requiredExtensions
IList<CertificateExtension>list of required CertificateExtension
Returns
- SignatureValidationProperties
this same SignatureValidationProperties instance
SetRevocationOnlineFetching(ValidatorContexts, CertificateSources, TimeBasedContexts, OnlineFetching)
Sets the onlineFetching property representing possible online fetching permissions.
public SignatureValidationProperties SetRevocationOnlineFetching(ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, SignatureValidationProperties.OnlineFetching onlineFetching)
Parameters
validatorContexts
ValidatorContextsthe validators for which to set this value
certificateSources
CertificateSourcesthe certificate source for which to set this value
timeBasedContexts
TimeBasedContextstime perspective context, at which validation is happening
onlineFetching
SignatureValidationProperties.OnlineFetchingonlineFetching property value to set
Returns
- SignatureValidationProperties
this same SignatureValidationProperties instance.