'Declaration
<ExtensionAttribute()> Public Shared Function ProtectOrUnprotectOwnCertificate( _ ByVal application As IEasyUAClientServerApplication, _ ByVal newPrivateKeyPassword As String _ ) As Boolean
'Usage
Dim application As IEasyUAClientServerApplication Dim newPrivateKeyPassword As String Dim value As Boolean value = IEasyUAClientServerApplicationExtension.ProtectOrUnprotectOwnCertificate(application, newPrivateKeyPassword)
[Extension()] public static bool ProtectOrUnprotectOwnCertificate( IEasyUAClientServerApplication application, string newPrivateKeyPassword )
[Extension()] public: static bool ProtectOrUnprotectOwnCertificate( IEasyUAClientServerApplication^ application, String^ newPrivateKeyPassword )
Parameters
- application
- The OPC UA client/server application object that will perform the operation.
In client applications, this is typically obtained by calling System.IServiceProvider.GetService(System.Type) on the OpcLabs.EasyOpc.UA.IEasyUAClient (
EasyUAClient
object) with the type of OpcLabs.EasyOpc.UA.Application.IEasyUAClientServerApplication as an argument.The value of this parameter cannot be
null
(Nothing
in Visual Basic). - newPrivateKeyPassword
- Empty string to unprotected the certificate, or a non-empty password to use for protection of the certificate's private key.
The value of this parameter cannot be
null
(Nothing
in Visual Basic).
Return Value
true
when the resulting state of the certificate is protected. Returns false
otherwise.