.NET Based OPC UA Client/Server SDK  2.6.1.422
UnifiedAutomation.UaBase.CertificateValidator Class Reference

Validates certificates. More...

Public Member Functions

 CertificateValidator (ApplicationInstance application, UaSchema.EndpointConfiguration endpoint, UaSchema.CertificateCheckSettings settings)
 The default constructor. More...
 
virtual void Validate (ICertificate certificate)
 Validates a certificate. More...
 
virtual void Validate (ICertificate certificate, string applicationUri, string endpointUrl)
 Validates the specified certificate. More...
 
virtual void Validate (ICertificate certificate, ICertificate[] chain, string applicationUri, string endpointUrl)
 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...
 
void ChangeApplicationCertificate (ICertificate certificate)
 Changes the application certificate. More...
 
List< ICertificateGetIssuers (ICertificate certificate)
 Returns the issuers for the certificate. More...
 
X509CertificateValidator GetChannelValidator ()
 Returns an object that can be used with WCF channel. More...
 

Protected Member Functions

bool GetIssuers (ICertificate certificate, List< ICertificate > issuers, ICertificate[] chain, int chainIndex, UaSchema.SingleCertificateCheckSettings settings, ref ICertificate firstTrustedCertificate, ref StatusCode revocationUnknownStatus)
 Returns the issuers for the certificate. More...
 
virtual void InternalValidate (ICertificate certificate, ICertificate[] certificateChain, UaSchema.SingleCertificateCheckSettings settings)
 Throws an exception if validation fails. More...
 

Properties

string EndpointUrl [get]
 Gets the endpoint URL associated with the validator. More...
 
CertificateValidationEventHandler CertificateValidation
 Raised when a certificate validation error occurs. More...
 

Detailed Description

Validates certificates.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.CertificateValidator.CertificateValidator ( ApplicationInstance  application,
UaSchema.EndpointConfiguration  endpoint,
UaSchema.CertificateCheckSettings  settings 
)
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.
void UnifiedAutomation.UaBase.CertificateValidator.ChangeApplicationCertificate ( ICertificate  certificate)
inline

Changes the application certificate.

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

Returns an object that can be used with WCF channel.

List<ICertificate> UnifiedAutomation.UaBase.CertificateValidator.GetIssuers ( ICertificate  certificate)
inline

Returns the issuers for the certificate.

bool UnifiedAutomation.UaBase.CertificateValidator.GetIssuers ( ICertificate  certificate,
List< ICertificate issuers,
ICertificate[]  chain,
int  chainIndex,
UaSchema.SingleCertificateCheckSettings  settings,
ref ICertificate  firstTrustedCertificate,
ref StatusCode  revocationUnknownStatus 
)
inlineprotected

Returns the issuers for the certificate.

virtual void UnifiedAutomation.UaBase.CertificateValidator.InternalValidate ( ICertificate  certificate,
ICertificate[]  certificateChain,
UaSchema.SingleCertificateCheckSettings  settings 
)
inlineprotectedvirtual

Throws an exception if validation fails.

Parameters
certificateThe certificate.
certificateChainThe certificate chain.
settingsThe settings to use when checking the certificate.
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,
string  applicationUri,
string  endpointUrl 
)
inlinevirtual

Validates the specified certificate.

Parameters
certificateThe certificate.
applicationUriIf not null the certificate must contain this URI.
endpointUrlIf not null the certificate hostnames must match this URL.
virtual void UnifiedAutomation.UaBase.CertificateValidator.Validate ( ICertificate  certificate,
ICertificate[]  chain,
string  applicationUri,
string  endpointUrl 
)
inlinevirtual

Validates a certificate.

Parameters
certificateThe certificate.
chainThe chain.
applicationUriIf not null the certificate must contain this URI.
endpointUrlIf not null the certificate hostnames must match this URL.
Exceptions
System.ArgumentNullExceptioncertificate

Property Documentation

CertificateValidationEventHandler UnifiedAutomation.UaBase.CertificateValidator.CertificateValidation
addremove

Raised when a certificate validation error occurs.

string UnifiedAutomation.UaBase.CertificateValidator.EndpointUrl
get

Gets the endpoint URL associated with the validator.

The endpoint URL associated with the validator.


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