Skip to content

Reference

OpcCertificateSettings Members

Defines the setup of an application instance certificate.

Reference

OpcCertificateSettings Members ​

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

Constructors ​

OpcCertificateSettings ​

Initializes a new instance of the OpcCertificateSettings class using the name of the application its instance certificate information is to be represented by the settings.

csharp
public OpcCertificateSettings(string applicationName)
vbnet
Public Sub New(applicationName As String)

Parameters

NameTypeDescription
applicationNameStringThe name of the application its certificate information is to be maintained.

Exceptions

ExceptionCondition
ArgumentExceptionThe applicationName is an empty string.
ArgumentNullExceptionThe applicationName is a null reference (Nothing in Visual Basic).

Fields ​

DefaultKeySize ​

static

Represents the default value that is used by the OpcCertificateSettings as initial value of the KeySize property.

csharp
public static readonly int DefaultKeySize
vbnet
Public Shared ReadOnly DefaultKeySize As Integer

Field value

Int32

DefaultLifetime ​

static

Represents the default value that is used by the OpcCertificateSettings as initial value of the Lifetime property.

csharp
public static readonly int DefaultLifetime
vbnet
Public Shared ReadOnly DefaultLifetime As Integer

Field value

Int32

Properties ​

ApplicationName ​

Gets the name of the application its instance certificate is setup.

csharp
public string ApplicationName { get; }
vbnet
Public ReadOnly Property ApplicationName As String

Property value

String

The full qualified name of the application to identify by the certificate.

ApplicationUri ​

Gets or sets the uniform resource identifier of the application instance.

csharp
public Uri ApplicationUri { get; set; }
vbnet
Public Property ApplicationUri As Uri

Property value

Uri

The full qualified Uri to the application instance resource identified by the certificate or a null reference (Nothing in Visual Basic). The default value is a null reference (Nothing in Visual Basic).

DomainNames ​

Gets a collection of domain names typically used by the application instance. In case of a server application the list have to contain the name of the machine used to access the server.

csharp
public Collection<string> DomainNames { get; }
vbnet
Public ReadOnly Property DomainNames As Collection(Of String)

Property value

Collection<String>

A Collection<T> of domain names used within the environment of the application instance (can be left empty). The default list of domain names is empty.

Remarks

In case there is no domain name defined the host name of the machine which creates the application instance certificate is used instead. In case of a server application the domain name have to be the name of the machine which is to be used by the clients to access the server.

KeySize ​

Gets or sets the number of bits to use to create the key of the certificate.

csharp
public int KeySize { get; set; }
vbnet
Public Property KeySize As Integer

Property value

Int32

The number of bits (a multiple of eight) to use for the key.

Exceptions

ExceptionCondition
ArgumentExceptionThe value is not a multiple of eight.
ArgumentOutOfRangeExceptionThe value is lower than eight.

Remarks

The default value is DefaultKeySize.

Lifetime ​

Gets or sets the number of months the certificate will be valid.

csharp
public int Lifetime { get; set; }
vbnet
Public Property Lifetime As Integer

Property value

Int32

The number of months until the certificate will expire, starting at the month within the certificate has been created.

Exceptions

ExceptionCondition
ArgumentOutOfRangeExceptionThe value is lower than one.

Remarks

The default value is DefaultLifetime.

Organization ​

since v2.58

Gets or sets the name of the organization running the application instance.

csharp
public string Organization { get; set; }
vbnet
Public Property Organization As String

Property value

String

The name of the organization used as the organization name (O) portion of the subject of the application instance certificate or a null reference (Nothing in Visual Basic) in case there the subject does not contain an organization name. The default value is a null reference (Nothing in Visual Basic).

Remarks

The value is only used in case there the SubjectName is a null reference (Nothing in Visual Basic).

SubjectName ​

Gets or sets the subject name portion of the certificate.

csharp
public string SubjectName { get; set; }
vbnet
Public Property SubjectName As String

Property value

String

The subject name (SN) portion of the application instance certificate or a null reference (Nothing in Visual Basic). The default value is a null reference (Nothing in Visual Basic).

Methods ​

Of ​

static

Retrieves the best certificate setup for the application instance specified.

csharp
[CLSCompliant(false)]
public static OpcCertificateSettings Of(IOpcApplicationInstance instance)
vbnet
<CLSCompliant(False)>
Public Shared Function [Of](
    instance As IOpcApplicationInstance) As OpcCertificateSettings

Parameters

NameTypeDescription
instanceIOpcApplicationInstanceThe application instance for that the best certificate setup is to be retrieved.

Returns

OpcCertificateSettings

An instance of the OpcCertificateSettings setup using the application information provided the instance passed.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe instance is a null reference (Nothing in Visual Basic).