OpcCertificateManager Members

Namespace: Opc.UaFx
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcCertificateManager type exposes the following members.

QueryInstance

Occurs when a Cryptography.X509Certificates.X509Certificate2 instance is to be created using several certificate and key information. This event can be used to create new Cryptography.X509Certificates.X509Certificate2 instances while considering custom, platform and operating system related restrictions.

C#

public static event OpcCertificateQueryInstanceEventHandler QueryInstance

CreateCertificate(IOpcApplicationInstance)

Creates a new application instance certificate (in memory) using the application instance specified.

C#

[CLSCompliant(false)]
public static X509Certificate2 CreateCertificate(IOpcApplicationInstance instance)


Parameters

instance IOpcApplicationInstance

An instance implementing the IOpcApplicationInstance interface from that the necessary certificate information is retrieved to create the certificate.


Returns

Cryptography.X509Certificates.X509Certificate2

A new instance of the Cryptography.X509Certificates.X509Certificate2 class representing the newly created certificate using the application instance information provided by instance.



Exceptions

ArgumentNullException

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

CreateCertificate(IOpcApplicationInstance, OpcCertificateStoreInfo)

Creates a new application instance certificate using the instance specified, while the created certificate will be stored in the certificate store defined by store.

C#

[CLSCompliant(false)]
public static X509Certificate2 CreateCertificate(IOpcApplicationInstance instance, OpcCertificateStoreInfo store)


Parameters

instance IOpcApplicationInstance

An instance implementing the IOpcApplicationInstance interface from that the necessary certificate information is retrieved to create the certificate.

store OpcCertificateStoreInfo

The OpcCertificateStoreInfo of the certificate store to that the newly created certificate is to be added or a null reference (Nothing in Visual Basic) in case there the certificate is to be created in memory.


Returns

Cryptography.X509Certificates.X509Certificate2

A new instance of the Cryptography.X509Certificates.X509Certificate2 class representing the newly created certificate using the application instance information provided by instance.



Exceptions

ArgumentNullException

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

CreateCertificate(OpcCertificateSettings)

Creates a new application instance certificate (in memory) using the certificate settings specified.

C#

public static X509Certificate2 CreateCertificate(OpcCertificateSettings settings)


Parameters

settings OpcCertificateSettings

The OpcCertificateSettings to use to create the certificate.


Returns

Cryptography.X509Certificates.X509Certificate2

A new instance of the Cryptography.X509Certificates.X509Certificate2 class representing the newly created certificate using certificate settings specified.



Exceptions

ArgumentNullException

The settings is a null reference (Nothing in Visual Basic).

CreateCertificate(OpcCertificateSettings, OpcCertificateStoreInfo)

Creates a new application instance certificate using the certificate settings specified, while the created certificate will be stored in the certificate store defined by store.

C#

public static X509Certificate2 CreateCertificate(OpcCertificateSettings settings, OpcCertificateStoreInfo store)


Parameters

settings OpcCertificateSettings

The OpcCertificateSettings to use to create the certificate.

store OpcCertificateStoreInfo

The OpcCertificateStoreInfo of the certificate store to that the newly created certificate is to be added or a null reference (Nothing in Visual Basic) in case there the certificate is to be created in memory.


Returns

Cryptography.X509Certificates.X509Certificate2

A new instance of the Cryptography.X509Certificates.X509Certificate2 class representing the newly created certificate using certificate settings specified.



Exceptions

ArgumentNullException

The settings is a null reference (Nothing in Visual Basic).

LoadCertificate(String)

Loads the application instance certificate using the certificate file specified by filePath.

C#

public static X509Certificate2 LoadCertificate(string filePath)


Parameters

filePath String

The file path of the certificate file to load.


Returns

Cryptography.X509Certificates.X509Certificate2

A new instance of the Cryptography.X509Certificates.X509Certificate2 class representing the certificate specified by filePath.



Exceptions

ArgumentException

The filePath is an empty string.

ArgumentNullException

The filePath is a null reference (Nothing in Visual Basic).

FileNotFoundException

The certificate file specified by filePath could not found.

LoadCertificate(String, String)

Loads the application instance certificate using the certificate file specified by filePath.

C#

public static X509Certificate2 LoadCertificate(string filePath, string password)


Parameters

filePath String

The file path of the certificate file load.

password String

The optional password required to access the certificate or a null reference (Nothing in Visual Basic), if there is no password required by the certificate file.


Returns

Cryptography.X509Certificates.X509Certificate2

A new instance of the Cryptography.X509Certificates.X509Certificate2 class representing the certificate specified by filePath.



Exceptions

ArgumentException

The filePath is an empty string.

ArgumentNullException

The filePath is a null reference (Nothing in Visual Basic).

FileNotFoundException

The certificate file specified by filePath could not found.

SaveCertificate(String, X509Certificate2)

Saves the application instance certificate to the filePath specified.

C#

public static void SaveCertificate(string filePath, X509Certificate2 certificate)


Parameters

filePath String

The full qualified path to the certificate file to write.

certificate Cryptography.X509Certificates.X509Certificate2

The Cryptography.X509Certificates.X509Certificate2 instance its certificate information is to be written to the filePath.



Exceptions

ArgumentNullException

The filePath or certificate is a null reference (Nothing in Visual Basic).