C# Class Opc.Ua.DirectoryCertificateStore

Provides access to a simple file based certificate store.
Inheritance: ICertificateStore
Afficher le fichier Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Méthodes publiques

Méthode Description
Add ( X509Certificate2 certificate ) : Task
AddCRL ( X509CRL crl ) : void

Adds a CRL to the store.

Close ( ) : void
Delete ( string thumbprint ) : Task
DeleteCRL ( X509CRL crl ) : bool

Removes a CRL from the store.

DirectoryCertificateStore ( ) : System

Initializes a store with the specified directory path.

Dispose ( ) : void

May be called by the application to clean up resources.

Enumerate ( ) : Task
EnumerateCRLs ( ) : List

Returns the CRLs in the store.

EnumerateCRLs ( X509Certificate2 issuer ) : List

Returns the CRLs for the issuer.

FindByThumbprint ( string thumbprint ) : Task
GetAccessRules ( ) : IList
GetAccessRules ( string thumbprint ) : IList
GetCrlFilePaths ( string thumbprint ) : string[]

Gets the CRL file paths.

GetPrivateKeyFilePath ( string thumbprint ) : string
GetPublicKeyFilePath ( string thumbprint ) : string
IsRevoked ( X509Certificate2 issuer, X509Certificate2 certificate ) : Opc.Ua.StatusCode

Checks if issuer has revoked the certificate.

LoadPrivateKey ( string thumbprint, string subjectName, string password ) : X509Certificate2

Loads the private key from a PFX file in the certificate store.

Open ( string location ) : void
SetAccessRules ( IList rules, bool replaceExisting ) : void
SetAccessRules ( string thumbprint, IList rules, bool replaceExisting ) : void

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Cleans up all resources held by the object.

Private Methods

Méthode Description
Find ( string thumbprint ) : Entry

Finds the public key for the certificate.

GetFileName ( X509Certificate2 certificate ) : string

Returns the file name to use for the certificate.

Load ( string thumbprint ) : Entry>.IDictionary

Reads the current contents of the directory from disk.

WriteFile ( byte data, string fileName, bool includePrivateKey ) : void

Writes the data to a file.

Method Details

Add() public méthode

public Add ( X509Certificate2 certificate ) : Task
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
Résultat Task

AddCRL() public méthode

Adds a CRL to the store.
public AddCRL ( X509CRL crl ) : void
crl X509CRL
Résultat void

Close() public méthode

public Close ( ) : void
Résultat void

Delete() public méthode

public Delete ( string thumbprint ) : Task
thumbprint string
Résultat Task

DeleteCRL() public méthode

Removes a CRL from the store.
public DeleteCRL ( X509CRL crl ) : bool
crl X509CRL
Résultat bool

DirectoryCertificateStore() public méthode

Initializes a store with the specified directory path.
public DirectoryCertificateStore ( ) : System
Résultat System

Dispose() public méthode

May be called by the application to clean up resources.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Cleans up all resources held by the object.
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Enumerate() public méthode

public Enumerate ( ) : Task
Résultat Task

EnumerateCRLs() public méthode

Returns the CRLs in the store.
public EnumerateCRLs ( ) : List
Résultat List

EnumerateCRLs() public méthode

Returns the CRLs for the issuer.
public EnumerateCRLs ( X509Certificate2 issuer ) : List
issuer System.Security.Cryptography.X509Certificates.X509Certificate2
Résultat List

FindByThumbprint() public méthode

public FindByThumbprint ( string thumbprint ) : Task
thumbprint string
Résultat Task

GetAccessRules() public méthode

public GetAccessRules ( ) : IList
Résultat IList

GetAccessRules() public méthode

public GetAccessRules ( string thumbprint ) : IList
thumbprint string
Résultat IList

GetCrlFilePaths() public méthode

Gets the CRL file paths.
public GetCrlFilePaths ( string thumbprint ) : string[]
thumbprint string The certificate thumbprint.
Résultat string[]

GetPrivateKeyFilePath() public méthode

public GetPrivateKeyFilePath ( string thumbprint ) : string
thumbprint string
Résultat string

GetPublicKeyFilePath() public méthode

public GetPublicKeyFilePath ( string thumbprint ) : string
thumbprint string
Résultat string

IsRevoked() public méthode

Checks if issuer has revoked the certificate.
public IsRevoked ( X509Certificate2 issuer, X509Certificate2 certificate ) : Opc.Ua.StatusCode
issuer System.Security.Cryptography.X509Certificates.X509Certificate2
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
Résultat Opc.Ua.StatusCode

LoadPrivateKey() public méthode

Loads the private key from a PFX file in the certificate store.
public LoadPrivateKey ( string thumbprint, string subjectName, string password ) : X509Certificate2
thumbprint string
subjectName string
password string
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2

Open() public méthode

public Open ( string location ) : void
location string
Résultat void

SetAccessRules() public méthode

public SetAccessRules ( IList rules, bool replaceExisting ) : void
rules IList
replaceExisting bool
Résultat void

SetAccessRules() public méthode

public SetAccessRules ( string thumbprint, IList rules, bool replaceExisting ) : void
thumbprint string
rules IList
replaceExisting bool
Résultat void