C# Class Opc.Ua.DirectoryCertificateStore

Provides access to a simple file based certificate store.
Inheritance: ICertificateStore
ファイルを表示 Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Public Methods

Method 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

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Cleans up all resources held by the object.

Private Methods

Method 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 method

public Add ( X509Certificate2 certificate ) : Task
certificate System.Security.Cryptography.X509Certificates.X509Certificate2
return Task

AddCRL() public method

Adds a CRL to the store.
public AddCRL ( X509CRL crl ) : void
crl X509CRL
return void

Close() public method

public Close ( ) : void
return void

Delete() public method

public Delete ( string thumbprint ) : Task
thumbprint string
return Task

DeleteCRL() public method

Removes a CRL from the store.
public DeleteCRL ( X509CRL crl ) : bool
crl X509CRL
return bool

DirectoryCertificateStore() public method

Initializes a store with the specified directory path.
public DirectoryCertificateStore ( ) : System
return System

Dispose() public method

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

Dispose() protected method

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

Enumerate() public method

public Enumerate ( ) : Task
return Task

EnumerateCRLs() public method

Returns the CRLs in the store.
public EnumerateCRLs ( ) : List
return List

EnumerateCRLs() public method

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

FindByThumbprint() public method

public FindByThumbprint ( string thumbprint ) : Task
thumbprint string
return Task

GetAccessRules() public method

public GetAccessRules ( ) : IList
return IList

GetAccessRules() public method

public GetAccessRules ( string thumbprint ) : IList
thumbprint string
return IList

GetCrlFilePaths() public method

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

GetPrivateKeyFilePath() public method

public GetPrivateKeyFilePath ( string thumbprint ) : string
thumbprint string
return string

GetPublicKeyFilePath() public method

public GetPublicKeyFilePath ( string thumbprint ) : string
thumbprint string
return string

IsRevoked() public method

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
return Opc.Ua.StatusCode

LoadPrivateKey() public method

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
return System.Security.Cryptography.X509Certificates.X509Certificate2

Open() public method

public Open ( string location ) : void
location string
return void

SetAccessRules() public method

public SetAccessRules ( IList rules, bool replaceExisting ) : void
rules IList
replaceExisting bool
return void

SetAccessRules() public method

public SetAccessRules ( string thumbprint, IList rules, bool replaceExisting ) : void
thumbprint string
rules IList
replaceExisting bool
return void