iText 8.0.5 API
iText.Signatures.Validation.V1.SignatureValidationProperties Class Reference

Class which stores properties, which are related to signature validation process. More...

Public Types

enum   OnlineFetching { OnlineFetching.ALWAYS_FETCH, OnlineFetching.FETCH_IF_NO_OTHER_DATA_AVAILABLE, OnlineFetching.NEVER_FETCH }
  Enum representing possible online fetching permissions. More...
 

Public Member Functions

  SignatureValidationProperties ()
  Create SignatureValidationProperties with default values. More...
 
virtual TimeSpan  GetFreshness (ValidationContext validationContext)
  Returns the freshness setting for the provided validation context or the default context in milliseconds. More...
 
iText.Signatures.Validation.V1.SignatureValidationProperties  SetFreshness (ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, TimeSpan value)
  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. More...
 
virtual bool  GetContinueAfterFailure (ValidationContext validationContext)
  Returns the Continue after failure setting for the provided context or the default context. More...
 
iText.Signatures.Validation.V1.SignatureValidationProperties  SetContinueAfterFailure (ValidatorContexts validatorContexts, CertificateSources certificateSources, bool value)
  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 ValidationResult::INVALID is considered to be a failure. More...
 
virtual SignatureValidationProperties.OnlineFetching  GetRevocationOnlineFetching (ValidationContext validationContext)
  Sets the onlineFetching property representing possible online fetching permissions. More...
 
iText.Signatures.Validation.V1.SignatureValidationProperties  SetRevocationOnlineFetching (ValidatorContexts validatorContexts, CertificateSources certificateSources, TimeBasedContexts timeBasedContexts, SignatureValidationProperties.OnlineFetching onlineFetching)
  Sets the onlineFetching property representing possible online fetching permissions. More...
 
virtual IList< CertificateExtension GetRequiredExtensions (ValidationContext validationContext)
  Returns required extension for the provided validation context. More...
 
iText.Signatures.Validation.V1.SignatureValidationProperties  SetRequiredExtensions (CertificateSources certificateSources, IList< CertificateExtension > requiredExtensions)
  Set list of extensions which are required to be set to a certificate depending on certificate source. More...
 
virtual IList< ICrlClient GetCrlClients ()
  Gets all ICrlClient instances which will be used to retrieve CRL responses during the validation. More...
 
SignatureValidationProperties  AddCrlClient (ICrlClient crlClient)
  Adds new ICrlClient instance which will be used to retrieve CRL responses during the validation. More...
 
virtual IList< IOcspClient GetOcspClients ()
  Gets all IOcspClient instances which will be used to retrieve OCSP responses during the validation. More...
 
SignatureValidationProperties  AddOcspClient (IOcspClient ocspClient)
  Adds new IOcspClient instance which will be used to retrieve OCSP response during the validation. More...
 

Static Public Attributes

const bool  DEFAULT_CONTINUE_AFTER_FAILURE = true
 
static readonly TimeSpan  DEFAULT_FRESHNESS_PRESENT_CRL = TimeSpan.FromDays(30)
 
static readonly TimeSpan  DEFAULT_FRESHNESS_PRESENT_OCSP = TimeSpan.FromDays(30)
 
static readonly TimeSpan  DEFAULT_FRESHNESS_HISTORICAL = TimeSpan.FromMinutes(1)
 
static readonly SignatureValidationProperties.OnlineFetching  DEFAULT_ONLINE_FETCHING
 

Detailed Description

Class which stores properties, which are related to signature validation process.

Member Enumeration Documentation

◆ OnlineFetching

Enum representing possible online fetching permissions.

Enumerator
ALWAYS_FETCH 

Permission to always fetch revocation data online.

FETCH_IF_NO_OTHER_DATA_AVAILABLE 

Permission to fetch revocation data online if no other revocation data available.

NEVER_FETCH 

Forbids fetching revocation data online.

Constructor & Destructor Documentation

◆ SignatureValidationProperties()

iText.Signatures.Validation.V1.SignatureValidationProperties.SignatureValidationProperties ( )
inline

Create SignatureValidationProperties with default values.

Member Function Documentation

◆ AddCrlClient()

SignatureValidationProperties iText.Signatures.Validation.V1.SignatureValidationProperties.AddCrlClient ( ICrlClient  crlClient )
inline

Adds new ICrlClient instance which will be used to retrieve CRL responses during the validation.

Parameters
crlClient ICrlClient instance which will be used to retrieve CRL responses during the validation
Returns
this same SignatureValidationProperties instance

◆ AddOcspClient()

SignatureValidationProperties iText.Signatures.Validation.V1.SignatureValidationProperties.AddOcspClient ( IOcspClient  ocspClient )
inline

Adds new IOcspClient instance which will be used to retrieve OCSP response during the validation.

Parameters
ocspClient IOcspClient instance which will be used to retrieve OCSP response during the validation
Returns
this same SignatureValidationProperties instance

◆ GetContinueAfterFailure()

virtual bool iText.Signatures.Validation.V1.SignatureValidationProperties.GetContinueAfterFailure ( ValidationContext  validationContext )
inlinevirtual

Returns the Continue after failure setting for the provided context or the default context.

Parameters
validationContext the context for which to retrieve the Continue after failure setting
Returns
the Continue after failure setting for the provided context or the default context

◆ GetCrlClients()

virtual IList<ICrlClient> iText.Signatures.Validation.V1.SignatureValidationProperties.GetCrlClients ( )
inlinevirtual

Gets all ICrlClient instances which will be used to retrieve CRL responses during the validation.

Returns
all ICrlClient instances which will be used to retrieve CRL responses during the validation

◆ GetFreshness()

virtual TimeSpan iText.Signatures.Validation.V1.SignatureValidationProperties.GetFreshness ( ValidationContext  validationContext )
inlinevirtual

Returns the freshness setting for the provided validation context or the default context in milliseconds.

Parameters
validationContext the validation context for which to retrieve the freshness setting
Returns
the freshness setting for the provided validation context or the default context in milliseconds

◆ GetOcspClients()

virtual IList<IOcspClient> iText.Signatures.Validation.V1.SignatureValidationProperties.GetOcspClients ( )
inlinevirtual

Gets all IOcspClient instances which will be used to retrieve OCSP responses during the validation.

Returns
all IOcspClient instances which will be used to retrieve OCSP responses during the validation

◆ GetRequiredExtensions()

virtual IList<CertificateExtension> iText.Signatures.Validation.V1.SignatureValidationProperties.GetRequiredExtensions ( ValidationContext  validationContext )
inlinevirtual

Returns required extension for the provided validation context.

Parameters
validationContext the validation context for which to retrieve required extensions
Returns
required extensions for the provided validation context

◆ GetRevocationOnlineFetching()

virtual SignatureValidationProperties.OnlineFetching iText.Signatures.Validation.V1.SignatureValidationProperties.GetRevocationOnlineFetching ( ValidationContext  validationContext )
inlinevirtual

Sets the onlineFetching property representing possible online fetching permissions.

Parameters
validationContext the context for which to retrieve the online fetching setting
Returns
the online fetching setting.

◆ SetContinueAfterFailure()

iText.Signatures.Validation.V1.SignatureValidationProperties iText.Signatures.Validation.V1.SignatureValidationProperties.SetContinueAfterFailure ( ValidatorContexts  validatorContexts,
CertificateSources  certificateSources,
bool  value 
)
inline

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 ValidationResult::INVALID is considered to be a failure.

Parameters
validatorContexts the validators for which to set the Continue after failure setting
certificateSources the certificateSources for which to set the Continue after failure setting
value the Continue after failure setting
Returns
this same SignatureValidationProperties instance.

◆ SetFreshness()

iText.Signatures.Validation.V1.SignatureValidationProperties iText.Signatures.Validation.V1.SignatureValidationProperties.SetFreshness ( ValidatorContexts  validatorContexts,
CertificateSources  certificateSources,
TimeBasedContexts  timeBasedContexts,
TimeSpan  value 
)
inline

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.

Parameters
validatorContexts the validators for which to apply the setting
certificateSources the certificate sources to
timeBasedContexts the date comparison context for which to apply the setting
value the settings value in milliseconds
Returns
this same SignatureValidationProperties instance.

◆ SetRequiredExtensions()

iText.Signatures.Validation.V1.SignatureValidationProperties iText.Signatures.Validation.V1.SignatureValidationProperties.SetRequiredExtensions ( CertificateSources  certificateSources,
IList< CertificateExtension requiredExtensions 
)
inline

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.

Parameters
certificateSources CertificateSource for extensions to be present
requiredExtensions list of required CertificateExtension
Returns
this same SignatureValidationProperties instance

◆ SetRevocationOnlineFetching()

iText.Signatures.Validation.V1.SignatureValidationProperties iText.Signatures.Validation.V1.SignatureValidationProperties.SetRevocationOnlineFetching ( ValidatorContexts  validatorContexts,
CertificateSources  certificateSources,
TimeBasedContexts  timeBasedContexts,
SignatureValidationProperties.OnlineFetching  onlineFetching 
)
inline

Sets the onlineFetching property representing possible online fetching permissions.

Parameters
validatorContexts the validators for which to set this value
certificateSources the certificate source for which to set this value
timeBasedContexts time perspective context, at which validation is happening
onlineFetching onlineFetching property value to set
Returns
this same SignatureValidationProperties instance.

Member Data Documentation

◆ DEFAULT_ONLINE_FETCHING

readonly SignatureValidationProperties.OnlineFetching iText.Signatures.Validation.V1.SignatureValidationProperties.DEFAULT_ONLINE_FETCHING
static
Initial value:
.FETCH_IF_NO_OTHER_DATA_AVAILABLE
iText.Signatures.Validation.V1.SignatureValidationProperties.SignatureValidationProperties
SignatureValidationProperties()
Create SignatureValidationProperties with default values.
Definition: SignatureValidationProperties.cs:54