UA Bundle SDK .NET  2.2.0.255
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Groups Pages
UnifiedAutomation.UaBase.CertificateValidator Class Reference

Validates certificates. More...

Public Member Functions

 CertificateValidator (ApplicationInstance application)
 The default constructor. More...
 
virtual void Validate (ICertificate certificate)
 Validates a certificate. More...
 
virtual void Validate (ICertificate certificate, ICertificate[] chain, bool mustValidateChain)
 Validates the specified certificate. More...
 
virtual void Validate (ICertificate[] certificates, bool mustValidateChain)
 Validates a certificate. More...
 
void Accept (ICertificate certificate)
 Accepts the specified certificate for as long as the process is running. More...
 
void RemoveAcceptance (ICertificate certificate)
 Removes the certificate from the list of accepted certificates (does not change the trust list). More...
 
bool GetIssuers (ICertificate certificate, List< ICertificate > issuers, ICertificate[] chain, int chainIndex)
 Returns the issuers for the certificate. More...
 
X509CertificateValidator GetChannelValidator ()
 Returns an object that can be used with WCF channel. More...
 

Protected Member Functions

virtual void InternalValidate (ICertificate[] certificates, bool mustValidateChain)
 Throws an exception if validation fails. More...
 

Properties

CertificateValidationEventHandler CertificateValidation
 Raised when a certificate validation error occurs. More...
 

Detailed Description

Validates certificates.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.CertificateValidator.CertificateValidator ( ApplicationInstance  application)
inline

The default constructor.

Member Function Documentation

void UnifiedAutomation.UaBase.CertificateValidator.Accept ( ICertificate  certificate)
inline

Accepts the specified certificate for as long as the process is running.

Parameters
certificateThe certificate.
X509CertificateValidator UnifiedAutomation.UaBase.CertificateValidator.GetChannelValidator ( )
inline

Returns an object that can be used with WCF channel.

bool UnifiedAutomation.UaBase.CertificateValidator.GetIssuers ( ICertificate  certificate,
List< ICertificate issuers,
ICertificate[]  chain,
int  chainIndex 
)
inline

Returns the issuers for the certificate.

virtual void UnifiedAutomation.UaBase.CertificateValidator.InternalValidate ( ICertificate[]  certificates,
bool  mustValidateChain 
)
inlineprotectedvirtual

Throws an exception if validation fails.

Parameters
certificatesThe certificates.
mustValidateChainif set to true the all certificates in the chain must be available and valid.
Exceptions
StatusExceptionIf certificate cannot be accepted
void UnifiedAutomation.UaBase.CertificateValidator.RemoveAcceptance ( ICertificate  certificate)
inline

Removes the certificate from the list of accepted certificates (does not change the trust list).

Parameters
certificateThe certificate.
virtual void UnifiedAutomation.UaBase.CertificateValidator.Validate ( ICertificate  certificate)
inlinevirtual

Validates a certificate.

Parameters
certificateThe certificate to validate.

Each UA application may have a list of trusted certificates that is different from all other UA applications that may be running on the same machine. As a result, the certificate validator cannot rely completely on the Windows certificate store and user or machine specific CTLs (certificate trust lists). The validator constructs the trust chain for the certificate and follows the chain until it finds a certification that is in the application trust list. Non-fatal trust chain errors (i.e. certificate expired) are ignored if the certificate is in the application trust list. If no certificate in the chain is trusted then the validator will still accept the certification if there are no trust chain errors. The validator may be configured to ignore the application trust list and/or trust chain.

virtual void UnifiedAutomation.UaBase.CertificateValidator.Validate ( ICertificate  certificate,
ICertificate[]  chain,
bool  mustValidateChain 
)
inlinevirtual

Validates the specified certificate.

Parameters
certificateThe certificate.
chainThe chain.
mustValidateChainif set to true then all certificates in the chain must be available and valid.
virtual void UnifiedAutomation.UaBase.CertificateValidator.Validate ( ICertificate[]  certificates,
bool  mustValidateChain 
)
inlinevirtual

Validates a certificate.

Parameters
certificatesThe certificate chain. Must start with the certificate to validate.
mustValidateChainif set to true then all certificates in the chain must be available and valid.

Property Documentation

CertificateValidationEventHandler UnifiedAutomation.UaBase.CertificateValidator.CertificateValidation
addremove

Raised when a certificate validation error occurs.


The documentation for this class was generated from the following file: