# OpcCertificateStores Members

> Reference: Provides access to the set of OPC UA predefined certificate stores typically used by an OPC UA application to maintain its certificates.

<dl class="api-definition">
<dt>Type</dt>
<dd><a href="./">OpcCertificateStores</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

### ApplicationStore

Gets the certificate store which is used by the application to store its own application certificate.

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

```csharp
public OpcCertificateStoreInfo ApplicationStore { get; }
```

</div>

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

```vbnet
Public ReadOnly Property ApplicationStore As OpcCertificateStoreInfo
```

</div>

**Property value**

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

An instance of the [OpcCertificateStoreInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestoreinfo/) class to maintain the certificate store which is used to store the application certificate.

### AutoCreateCertificate

Gets or sets a value indicating whether the application certificate is to be created automatically in the case there is not a valid application certificate explicitly defined to use.

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

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

</div>

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

```vbnet
Public Property AutoCreateCertificate As Boolean
```

</div>

**Property value**

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

The value true in case there the application certificate is to be created automatically in case there is not a valid application certificate explicitly defined; otherwise the value false (the default value is true).

### PathProbings

<span class="api-meta">static · since v2.7</span>

Gets a collection of [OpcPathProbing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpathprobing/) instances evaluated to determine an appropriate path to use to store certificate files. This evaluation is performed by the [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath) method. Modifying the items of this property influences the default certificate store paths used.

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

```csharp
public static OpcPathProbingCollection PathProbings { get; }
```

</div>

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

```vbnet
Public Shared ReadOnly Property PathProbings As OpcPathProbingCollection
```

</div>

**Property value**

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

An instance of the [OpcPathProbingCollection](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpathprobingcollection/) class which contains all [OpcPathProbing](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opcpathprobing/) instances evaluated to determine an appropriate path to use to store certificate files.

**Remarks**

By default this property contains path probings which target the current working directory (using "."), the common application data and the application data of the environment.

### RejectedStore

Gets the certificate store which is used by the application to store all certificates which are not trusted and are therefore by default rejected by the application.

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

```csharp
public OpcCertificateStoreInfo RejectedStore { get; }
```

</div>

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

```vbnet
Public ReadOnly Property RejectedStore As OpcCertificateStoreInfo
```

</div>

**Property value**

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

An instance of the [OpcCertificateStoreInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestoreinfo/) class to maintain the certificate store which is used to store rejected certificates.

### TrustedIssuerStore

Gets the certificate store which is used by the application to store all certificates of trusted issuers.

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

```csharp
public OpcCertificateStoreInfo TrustedIssuerStore { get; }
```

</div>

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

```vbnet
Public ReadOnly Property TrustedIssuerStore As OpcCertificateStoreInfo
```

</div>

**Property value**

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

An instance of the [OpcCertificateStoreInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestoreinfo/) class to maintain the certificate store which is used to store trusted issuer certificates.

### TrustedPeerStore

Gets the certificate store which is used by the application to store all certificates of trusted applications.

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

```csharp
public OpcCertificateStoreInfo TrustedPeerStore { get; }
```

</div>

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

```vbnet
Public ReadOnly Property TrustedPeerStore As OpcCertificateStoreInfo
```

</div>

**Property value**

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

An instance of the [OpcCertificateStoreInfo](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestoreinfo/) class to maintain the certificate store which is used to store the application certificates of trusted applications.

## Methods

### GetDefaultApplicationStorePath

<span class="api-meta">static · since v2.7</span>

Retrieves the default path used by application certificate stores (see [ApplicationStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#applicationstore)) as the default store path. This path is an extension of the default root path used by all certificate store paths by default (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

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

```csharp
public static string GetDefaultApplicationStorePath()
```

</div>

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

```vbnet
Public Shared Function GetDefaultApplicationStorePath() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The default path used by application certificate stores or a null reference (Nothing in Visual Basic) if the default root path could not evaluated (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

### GetDefaultCertificateStoresPath

<span class="api-meta">static · since v2.7</span>

Retrieves the default root path used by all default store paths. These path is determined using the evaluation results of the [PathProbings](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#pathprobings) in combination with the sub-path 'OPC Foundation/CertificateStores' for non local working directories and with the sub-path 'CertificateStores' for local working directories.

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

```csharp
public static string GetDefaultCertificateStoresPath()
```

</div>

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

```vbnet
Public Shared Function GetDefaultCertificateStoresPath() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The default root path used by all default store paths or a null reference (Nothing in Visual Basic) if all [PathProbings](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#pathprobings) result into a null reference (Nothing in Visual Basic) or an empty string.

### GetDefaultRejectedStorePath

<span class="api-meta">static · since v2.7</span>

Retrieves the default path used by rejected certificate stores (see [RejectedStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#rejectedstore)) as the default store path. This path is an extension of the default root path used by all certificate store paths by default (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

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

```csharp
public static string GetDefaultRejectedStorePath()
```

</div>

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

```vbnet
Public Shared Function GetDefaultRejectedStorePath() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The default path used by rejected certificate stores or a null reference (Nothing in Visual Basic) if the default root path could not evaluated (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

### GetDefaultTrustedIssuerStorePath

<span class="api-meta">static · since v2.7</span>

Retrieves the default path used by trusted issuer certificate stores (see [TrustedIssuerStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#trustedissuerstore)) as the default store path. This path is an extension of the default root path used by all certificate store paths by default (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

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

```csharp
public static string GetDefaultTrustedIssuerStorePath()
```

</div>

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

```vbnet
Public Shared Function GetDefaultTrustedIssuerStorePath() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The default path used by trusted issuer certificate stores or a null reference (Nothing in Visual Basic) if the default root path could not evaluated (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

### GetDefaultTrustedPeerStorePath

<span class="api-meta">static · since v2.7</span>

Retrieves the default path used by trusted peer certificate stores (see [TrustedPeerStore](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#trustedpeerstore)) as the default store path. This path is an extension of the default root path used by all certificate store paths by default (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).

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

```csharp
public static string GetDefaultTrustedPeerStorePath()
```

</div>

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

```vbnet
Public Shared Function GetDefaultTrustedPeerStorePath() As String
```

</div>

**Returns**

[String](https://learn.microsoft.com/dotnet/api/system.string)

The default path used by trusted peer certificate stores or a null reference (Nothing in Visual Basic) if the default root path could not evaluated (see [GetDefaultCertificateStoresPath](https://www.traeger.de/en/docs/development/opcua/api/v2.59/opc.uafx.opccertificatestores/members#getdefaultcertificatestorespath)).
