# OpcSecurity Members

> Reference: Provides security options used by an application instance to control the authentication, the access and the possible operations between the opponent applications.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcSecurity</a></dd>
<dt>Namespace</dt>
<dd><a href="../namespaces/opc.uafx">Opc.UaFx</a></dd>
<dt>Assembly</dt>
<dd>Opc.UaFx.Advanced.dll</dd>
<dt>Package</dt>
<dd>Opc.UaFx.Advanced v2.59.0</dd>
<dt>Also in</dt>
<dd>Opc.UaFx.Client</dd>
</dl>

## Properties

### AutoAcceptUntrustedCertificates

Gets or sets a value indicating whether the client have to automatically accept untrusted server certificates.

<div class="api-signature" data-lang="csharp">

```csharp
public bool AutoAcceptUntrustedCertificates { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Property AutoAcceptUntrustedCertificates As Boolean
```

</div>

**Property value**

[Boolean](https://learn.microsoft.com/dotnet/api/system.boolean)

The value true if untrusted server certificates have to be automatically handled as trusted certificates; otherwise the value false (the default value is true).

**Remarks**

Additionally to define the value of this property as true there is also the possibility to define the value of this property as false and use the [CertificateValidationFailed](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.iopcapplicationinstance/members#certificatevalidationfailed) event to manually validate a server certificate.

### CertificateValidationRules

Gets or sets a value which defines the different rules to use when validating a certificate.

<div class="api-signature" data-lang="csharp">

```csharp
public OpcCertificateValidationRules CertificateValidationRules { get; set; }
```

</div>

<div class="api-signature" data-lang="vbnet">

```vbnet
Public Property CertificateValidationRules As OpcCertificateValidationRules
```

</div>

**Property value**

[OpcCertificateValidationRules](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatevalidationrules/)

A bitwise combination of the members defined by the [OpcCertificateValidationRules](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatevalidationrules/) enumeration to define the different rules to apply when validating a certificate. The default value is [Default](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatevalidationrules/#default).
