Infrastructure. Sets the application's own certificate.
Syntax
'Declaration
Protected MustOverride Sub SetOwnCertificate( _
ByVal As String, _
ByVal As IPkiCertificate, _
ByVal As String, _
ByVal () As Byte, _
ByVal As String, _
ByVal As String, _
ByVal As Boolean, _
ByVal As Boolean _
)
'Usage
Dim instance As AbstractEasyUAClientServerApplication
Dim certificateSubId As String
Dim pkiCertificate As IPkiCertificate
Dim privateKeyFormat As String
Dim formattedPrivateKey() As Byte
Dim oldPrivateKeyPassword As String
Dim newPrivateKeyPassword As String
Dim updateTrustedPeerCertificates As Boolean
Dim allowSubjectNameRemapping As Boolean
instance.SetOwnCertificate(certificateSubId, pkiCertificate, privateKeyFormat, formattedPrivateKey, oldPrivateKeyPassword, newPrivateKeyPassword, updateTrustedPeerCertificates, allowSubjectNameRemapping)
protected abstract void SetOwnCertificate(
string ,
IPkiCertificate ,
string ,
byte[] ,
string ,
string ,
bool ,
bool
)
protected:
abstract void SetOwnCertificate(
String^ ,
IPkiCertificate^ ,
String^ ,
array<byte>^ ,
String^ ,
String^ ,
bool ,
bool
)
Parameters
- certificateSubId
- The sub-id of the certificate. Normally an empty string.
- pkiCertificate
- The application's own certificate.
- privateKeyFormat
- The format of the private key.
- formattedPrivateKey
- The private key of the application's own certificate.
- oldPrivateKeyPassword
- Password to the certificate's current private key.
- newPrivateKeyPassword
- New password to the certificate's private key.
- updateTrustedPeerCertificates
- Determines whether the trusted peers certificate store will also be updated.
- allowSubjectNameRemapping
- Determines whether the certificate is allowed to have a subject name that is different from the requested subject name.
Exceptions
Exception | Description |
OpcLabs.EasyOpc.UA.OperationModel.UAException |
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