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

Validates certificates. More...

Inherits UnifiedAutomation.UaBase.ICertificateValidator.

Public Member Functions

 CertificateValidator (ISecurityProvider securityProvider, ApplicationInstanceBase application, UaSchema.EndpointConfiguration endpoint, UaSchema.CertificateCheckSettings settings)
 The default constructor. More...
 
void Dispose ()
 
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, IList< 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...
 
IList< ICertificateGetIssuers (ICertificate certificate)
 Returns the issuers for the certificate. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 
bool GetIssuers (ICertificate certificate, List< ICertificate > issuers, IList< 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, IList< ICertificate > certificateChain, UaSchema.SingleCertificateCheckSettings settings)
 Throws an exception if validation fails. More...
 

Properties

object UserData [get, set]
 Data provided by the user of the object. More...
 
string EndpointUrl [get]
 Gets the endpoint URL associated with the validator. More...
 
CertificateValidationEventHandler CertificateValidation
 Raised when a certificate validation error occurs. More...
 
- Properties inherited from UnifiedAutomation.UaBase.ICertificateValidator
object UserData [get, set]
 

Additional Inherited Members

- Events inherited from UnifiedAutomation.UaBase.ICertificateValidator
EventHandler
< CertificateValidationEventArgs
ValidationError
 

Detailed Description

Validates certificates.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.CertificateValidator.CertificateValidator ( ISecurityProvider  securityProvider,
ApplicationInstanceBase  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.

Implements UnifiedAutomation.UaBase.ICertificateValidator.

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

Changes the application certificate.

Parameters
certificateThe new certificate.

Implements UnifiedAutomation.UaBase.ICertificateValidator.

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

Returns the issuers for the certificate.

Implements UnifiedAutomation.UaBase.ICertificateValidator.

bool UnifiedAutomation.UaBase.CertificateValidator.GetIssuers ( ICertificate  certificate,
List< ICertificate issuers,
IList< 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,
IList< 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.

Implements UnifiedAutomation.UaBase.ICertificateValidator.

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.

Implements UnifiedAutomation.UaBase.ICertificateValidator.

virtual void UnifiedAutomation.UaBase.CertificateValidator.Validate ( ICertificate  certificate,
IList< 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

Implements UnifiedAutomation.UaBase.ICertificateValidator.

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.

object UnifiedAutomation.UaBase.CertificateValidator.UserData
getset

Data provided by the user of the object.


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