Skip to content

Reference

OpcCertificateValidationFailedEventArgs Members

Provides the event data for 'CertificateValidationFailed' events.

Reference

OpcCertificateValidationFailedEventArgs Members ​

Type
OpcCertificateValidationFailedEventArgs
Namespace
Opc.UaFx
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Also in
Opc.UaFx.Client

Inherits members from EventArgs.

Constructors ​

OpcCertificateValidationFailedEventArgs ​

Initializes a new instance of the OpcCertificateValidationFailedEventArgs class using the event data specified.

csharp
public OpcCertificateValidationFailedEventArgs(
    X509Certificate2 certificate,
    OpcCertificateValidationResult result,
    OpcResult resultInfo)
vbnet
Public Sub New(
    certificate As X509Certificate2,
    result As OpcCertificateValidationResult,
    resultInfo As OpcResult)

Parameters

NameTypeDescription
certificateX509Certificate2The X509Certificate2 instance providing the certificate data to validate/validated.
resultOpcCertificateValidationResultThe so far reached OpcCertificateValidationResult which indicates the reason, why the validation of the certificate failed.
resultInfoOpcResultThe OpcResult which provides additional information about the result. This information is also used in case of an un-accepted certificate for an exception.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe certificate or resultInfo is a null reference (Nothing in Visual Basic).

Properties ​

Accept ​

Gets or sets a value indicating whether to accept the Certificate independent from the Result of the certificate validation.

csharp
public bool Accept { get; set; }
vbnet
Public Property Accept As Boolean

Property value

Boolean

The value true to trust the Certificate; otherwise the value false. The default value is false.

Certificate ​

Gets the certificate its validation has failed.

csharp
public X509Certificate2 Certificate { get; }
vbnet
Public ReadOnly Property Certificate As X509Certificate2

Property value

X509Certificate2

An instance of the X509Certificate2 class representing the certificate its validation has been failed.

Result ​

Gets a value indicating the outcome of the certificate validation.

csharp
public OpcCertificateValidationResult Result { get; }
vbnet
Public ReadOnly Property Result As OpcCertificateValidationResult

Property value

OpcCertificateValidationResult

One of the members defined by the OpcCertificateValidationResult enumeration.

ResultInfo ​

Gets the information used to represent the Result in case there an exception is to be thrown.

csharp
public OpcResult ResultInfo { get; }
vbnet
Public ReadOnly Property ResultInfo As OpcResult

Property value

OpcResult

The information associated with the Result which is used for any subsequently thrown exception.

Methods ​

ToString ​

override

Returns a string that represents the current OpcCertificateValidationFailedEventArgs.

csharp
public override string ToString()
vbnet
Public Overrides Function ToString() As String

Returns

String

A string that represents the current OpcCertificateValidationFailedEventArgs including either the ResultInfo (if available) or the Result of the event data represented.

Overrides

ToString()