OPC Studio User's Guide and Reference
AcceptAnyCertificate Property (UACertificateAcceptancePolicy)



OpcLabs.EasyOpcUA Assembly > OpcLabs.EasyOpc.UA.Engine Namespace > UACertificateAcceptancePolicy Class : AcceptAnyCertificate Property
Determines whether the client accepts any server certificate, even if a certificate validation error occurs.
Syntax
'Declaration
 
<DebuggerBrowsableAttribute(DebuggerBrowsableState.Never)>
<DefaultValueAttribute(False)>
Public Shadows Property AcceptAnyCertificate As Boolean
'Usage
 
Dim instance As UACertificateAcceptancePolicy
Dim value As Boolean
 
instance.AcceptAnyCertificate = value
 
value = instance.AcceptAnyCertificate
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[DefaultValue(false)]
public new bool AcceptAnyCertificate {get; set;}
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
[DefaultValue(false)]
public:
new property bool AcceptAnyCertificate {
   bool get();
   void set (    bool value);
}
Remarks

When this property is true, it effectively bypasses an important security feature in OPC Unified Architecture. Use this value only for testing and development purposes, or if your application does not require the server certificate check.

In order to obtain or modify this parameter for server instance certificates, access the UAClientServerEngineParameters.CertificateAcceptancePolicy property of EasyUASharedParameters.EngineParameters property of OpcLabs.EasyOpc.UA.EasyUAClientCore.SharedParameters. Alternatively, you can override the certificate acceptance policy for a specific endpoint by setting it to a non-null value in OpcLabs.EasyOpc.UA.UAEndpointDescriptor.CertificateAcceptancePolicy.

In order to obtain or modify this parameter for HTTPS certificates, access the UAClientEngineParameters.HttpsCertificateAcceptancePolicy property of EasyUASharedParameters.EngineParameters property of OpcLabs.EasyOpc.UA.EasyUAClientCore.SharedParameters.

This method or property does not throw any exceptions, aside from execution exceptions such as System.Threading.ThreadAbortException or System.OutOfMemoryException.

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