OPC Studio User's Guide and Reference
FindOwnCertificatePrivateKey Method



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Application Namespace > AbstractEasyUAClientServerApplication Class : FindOwnCertificatePrivateKey Method

The value of this parameter cannot be null (Nothing in Visual Basic).

The value of this parameter cannot be null (Nothing in Visual Basic).

Infrastructure. Find the private key of the application's own certificate.
Syntax
'Declaration
 
<CanBeNullAttribute()>
Protected MustOverride Function FindOwnCertificatePrivateKey( _
   ByVal certificateSubId As String, _
   ByVal privateKeyPassword As String _
) As IPkiCertificate
'Usage
 
Dim instance As AbstractEasyUAClientServerApplication
Dim certificateSubId As String
Dim privateKeyPassword As String
Dim value As IPkiCertificate
 
value = instance.FindOwnCertificatePrivateKey(certificateSubId, privateKeyPassword)
[CanBeNull()]
protected abstract IPkiCertificate FindOwnCertificatePrivateKey( 
   string certificateSubId,
   string privateKeyPassword
)
[CanBeNull()]
protected:
abstract IPkiCertificate^ FindOwnCertificatePrivateKey( 
   String^ certificateSubId,
   String^ privateKeyPassword
) 

Parameters

certificateSubId

The value of this parameter cannot be null (Nothing in Visual Basic).

privateKeyPassword

The value of this parameter cannot be null (Nothing in Visual Basic).

Return Value

The certificate representing the private key of the application's own certificate.

This method can return null (Nothing in Visual Basic).

Exceptions
ExceptionDescription

The OPC UA operation has failed. This operation exception in uniformly used to allow common handling of various kinds of errors. The System.Exception.InnerException always contains information about the actual error cause.

This is an operation error that depends on factors external to your program, and thus cannot be always avoided. Your code must handle it appropriately.

Requirements

Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows

See Also