Reference
OpcCertificateStoreInfo Members
Represents a certificate store, which provides access to the certificates stored at its Path.
Reference
OpcCertificateStoreInfo Members
- Type
- OpcCertificateStoreInfo
- Namespace
- Opc.UaFx
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Constructors
OpcCertificateStoreInfo
Initializes a new instance of the OpcCertificateStoreInfo class using the path and type specified.
public OpcCertificateStoreInfo(string path, OpcCertificateStoreType type)Public Sub New(path As String, type As OpcCertificateStoreType)Parameters
| Name | Type | Description |
|---|---|---|
path | String | The path of the certificate store. |
type | Opc | The purpose of the certificate store. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The path is an empty string. |
| Argument | The path is a null reference ( |
Remarks
The PathType is determined from the path: a path which starts with "LocalMachine\", "CurrentUser\", "User\" or "Service\" is a store of the operating system (System), any other path a directory (Directory).
Properties
Path
Gets or sets the path of the certificate store.
public string Path { get; set; }Public Property Path As StringProperty value
The path of the certificate store.
Remarks
Setting the path does not change the PathType.
PathType
Gets or sets the kind of the Path of the certificate store.
public OpcCertificateStorePathType PathType { get; set; }Public Property PathType As OpcCertificateStorePathTypeProperty value
One of the members of OpcCertificateStorePathType.
Type
Gets the purpose of the certificate store.
public OpcCertificateStoreType Type { get; }Public ReadOnly Property Type As OpcCertificateStoreTypeProperty value
One of the members of OpcCertificateStoreType.
Methods
Add
Adds the certificate specified to the certificate store.
public void Add(X509Certificate2 certificate)Public Sub Add(certificate As X509Certificate2)Parameters
| Name | Type | Description |
|---|---|---|
certificate | X509Certificate2 | The certificate to add. |
Exceptions
| Exception | Condition |
|---|---|
| Argument | The certificate is a null reference ( |
Clear
Removes all certificates from the certificate store.
public void Clear()Public Sub Clear()Remarks
For a store of trusted certificates, the method also removes the certificates listed in its configuration.
Contains
| Overload | Description |
|---|---|
| Contains( | Determines whether the certificate store contains a certificate with the thumbprint of the certificate specified. |
| Contains( | Determines whether the certificate store contains a certificate with the thumbprint specified. |
Contains(X509Certificate2)
Determines whether the certificate store contains a certificate with the thumbprint of the certificate specified.
public bool Contains(X509Certificate2 certificate)Public Function Contains(certificate As X509Certificate2) As BooleanParameters
| Name | Type | Description |
|---|---|---|
certificate | X509Certificate2 | The certificate to locate. |
Returns
The value true if the store contains a certificate with the thumbprint of the certificate; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The certificate is a null reference ( |
Contains(string)
Determines whether the certificate store contains a certificate with the thumbprint specified.
public bool Contains(string thumbprint)Public Function Contains(thumbprint As String) As BooleanParameters
| Name | Type | Description |
|---|---|---|
thumbprint | String | The thumbprint of the certificate to locate. |
Returns
The value true if the store contains a certificate with the thumbprint; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The thumbprint is an empty string. |
| Argument | The thumbprint is a null reference ( |
GetCertificate
Gets the certificate with the thumbprint specified from the certificate store.
public OpcCertificateInfo GetCertificate(string thumbprint)Public Function GetCertificate(thumbprint As String) As OpcCertificateInfoParameters
| Name | Type | Description |
|---|---|---|
thumbprint | String | The thumbprint of the certificate to get. |
Returns
An OpcCertificateInfo representing the certificate, or a null reference (Nothing in Visual Basic) if the store does not contain a certificate with the thumbprint.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The thumbprint is an empty string. |
| Argument | The thumbprint is a null reference ( |
GetCertificates
Gets the certificates of the certificate store.
public OpcCertificateInfo[] GetCertificates()Public Function GetCertificates() As OpcCertificateInfo()Returns
An array of the certificates of the store, each certificate once.
Remarks
For the store of the application certificate, the array also contains the configured application certificate. For a store of trusted certificates, it also contains the certificates listed in its configuration.
Remove
| Overload | Description |
|---|---|
| Remove( | Removes the certificate with the thumbprint of the certificate specified from the certificate store. |
| Remove( | Removes the certificate with the thumbprint specified from the certificate store. |
Remove(X509Certificate2)
Removes the certificate with the thumbprint of the certificate specified from the certificate store.
public bool Remove(X509Certificate2 certificate)Public Function Remove(certificate As X509Certificate2) As BooleanParameters
| Name | Type | Description |
|---|---|---|
certificate | X509Certificate2 | The certificate to remove. |
Returns
The value true if the certificate has been removed; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The certificate is a null reference ( |
Remove(string)
Removes the certificate with the thumbprint specified from the certificate store.
public bool Remove(string thumbprint)Public Function Remove(thumbprint As String) As BooleanParameters
| Name | Type | Description |
|---|---|---|
thumbprint | String | The thumbprint of the certificate to remove. |
Returns
The value true if the certificate has been removed; otherwise the value false.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The thumbprint is an empty string. |
| Argument | The thumbprint is a null reference ( |
ToString
Returns a string that represents the certificate store.
public override string ToString()Public Overrides Function ToString() As StringReturns
A string containing the Type, the PathType and the Path of the store.
Overrides

