.NET Based OPC UA Client/Server SDK
3.1.3.516
|
Provides access to the windows certificate store. More...
Inherits UnifiedAutomation.UaBase.ICertificateStore.
Public Member Functions | |
WindowsCertificateStore (string storePath) | |
Initializes a new instance of the WindowsCertificateStore class. More... | |
WindowsCertificateStore (CertificateStoreSettings settings) | |
Initializes a new instance of the WindowsCertificateStore class. More... | |
void | Dispose () |
May be called by the application to clean up resources. More... | |
virtual ICertificate | Find (string subjectName, string thumbprint, bool needPrivateKey=false) |
Finds a certificate in the store. More... | |
ICertificate | Find (string thumbprint, bool needPrivateKey=false) |
Finds a certificate in the store. More... | |
virtual ICertificate | Find (string subjectName, string thumbprint, bool needPrivateKey, string privateKeyPassword) |
Finds a certificate in the store. More... | |
virtual void | Add (ICertificate certificate, bool replaceExisting, bool savePrivateKey) |
Adds the specified certificate to the store. More... | |
virtual void | Add (ICertificate certificate, bool replaceExisting, bool savePrivateKey, string privateKeyPassword) |
Adds the specified certificate to the store. More... | |
virtual void | Remove (string thumbprint) |
Removes the specified thumbprint. More... | |
virtual StatusCode | IsRevoked (ICertificate issuer, ICertificate certificate) |
Determines whether the specified certificate has been revoked by the issuer. More... | |
virtual string | GetPrivateKeyFilePath (string thumbprint) |
Gets the private key file path. More... | |
virtual ICertificateRevocationList | ParseCRL (byte[] derData) |
Parse the raw representation of a CRL. More... | |
virtual IList < ICertificateRevocationList > | GetCRLs (ICertificate issuer) |
Returns the certificate revocation lists for an issuer. More... | |
virtual void | AddCRLs (IList< ICertificateRevocationList > crls, bool deleteExisting) |
Adds crls to the store. More... | |
virtual IEnumerator< ICertificate > | GetEnumerator () |
Returns an enumerator that iterates through the collection. More... | |
string | Format () |
Returns the string representation of the store. More... | |
Static Public Member Functions | |
static IList < WindowsCertificateStore > | EnumerateStores (WindowsStoreType storeType, string hostName, string serviceNameOrUserSid) |
Enumerates the available windows certificate store. More... | |
Protected Member Functions | |
virtual void | Dispose (bool disposing) |
Cleans up all resources held by the object. More... | |
Properties | |
string | StoreType [get] |
string | StorePath [get] |
string | SymbolicName [get] |
The symbolic name for the store. More... | |
WindowsStoreType | WindowsStoreType [get] |
The type of windows store. More... | |
string | HostName [get] |
The name of the machine. More... | |
string | ServiceNameOrUserSid [get] |
The service name or user SID. More... | |
CertificateValidationOptions | ValidationOptions [get] |
Gets or sets the validation options. More... | |
Properties inherited from UnifiedAutomation.UaBase.ICertificateStore | |
string | StoreType [get] |
Gets the store type. More... | |
string | StorePath [get] |
Gets the store path. More... | |
CertificateValidationOptions | ValidationOptions [get] |
Gets or sets the validation options. More... | |
Provides access to the windows certificate store.
The WindowsCertificateStore does not support CRLs.
UnifiedAutomation.UaBase.WindowsCertificateStore.WindowsCertificateStore | ( | string | storePath | ) |
Initializes a new instance of the WindowsCertificateStore class.
storePath | The store path. |
Syntax (items enclosed in [] are optional):
[\HostName\]StoreType[\(ServiceName | UserSid)]\SymbolicName
Examples:
\MYPC\LocalMachine\My
CurrentUser\Trust
\MYPC\Service\My UA Server\UA Applications
User\S-1-5-25\Root
UnifiedAutomation.UaBase.WindowsCertificateStore.WindowsCertificateStore | ( | CertificateStoreSettings | settings | ) |
Initializes a new instance of the WindowsCertificateStore class.
settings | The store settings |
Syntax of settings.StorePath (items enclosed in [] are optional):
[\HostName\]StoreType[\(ServiceName | UserSid)]\SymbolicName
Examples:
\MYPC\LocalMachine\My
CurrentUser\Trust
\MYPC\Service\My UA Server\UA Applications
User\S-1-5-25\Root
|
virtual |
Adds the specified certificate to the store.
certificate | The certificate. |
replaceExisting | If set to true any existing certificate is replaced. |
savePrivateKey | If set to true any private key is saved as well. |
|
virtual |
Adds the specified certificate to the store.
certificate | The certificate. |
replaceExisting | If set to true any existing certificate is replaced. |
savePrivateKey | If set to true any private key is saved as well. |
privateKeyPassword | Must be null or empty. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
virtual |
Adds crls to the store.
Throws NotSupportedException. Must be implemented by subclass.
Is called by ServerManger.OnTrustListWrite.
crls | |
deleteExisting |
Implements UnifiedAutomation.UaBase.ICertificateStore.
void UnifiedAutomation.UaBase.WindowsCertificateStore.Dispose | ( | ) |
May be called by the application to clean up resources.
|
protectedvirtual |
Cleans up all resources held by the object.
|
static |
Enumerates the available windows certificate store.
|
virtual |
Finds a certificate in the store.
subjectName | The subject name. |
thumbprint | The thumbprint. |
needPrivateKey | If set to true the certificate is only returned if a private key is accessible. |
ICertificate UnifiedAutomation.UaBase.WindowsCertificateStore.Find | ( | string | thumbprint, |
bool | needPrivateKey = false |
||
) |
Finds a certificate in the store.
Calls ICertificate Find(string subjectName, string thumbprint, bool needPrivateKey)
thumbprint | The thumbprint. |
needPrivateKey | If set to true the certificate is only returned if a private key is accessible. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
virtual |
Finds a certificate in the store.
Calls ICertificate Find(string subjectName, string thumbprint, bool needPrivateKey)
subjectName | The subject name. |
thumbprint | The thumbprint. |
needPrivateKey | If set to true the certificate is only returned if a private key is accessible. |
privateKeyPassword | Must be null or empty |
Implements UnifiedAutomation.UaBase.ICertificateStore.
string UnifiedAutomation.UaBase.WindowsCertificateStore.Format | ( | ) |
Returns the string representation of the store.
|
virtual |
Returns the certificate revocation lists for an issuer.
Throws NotSupportedException. Must be implemented by subclass.
Is called by ServerManger.OnTrustListRead.
issuer | The issuer of the returned crls. If null, all crls in the store must be returned. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
virtual |
Returns an enumerator that iterates through the collection.
|
virtual |
Gets the private key file path.
thumbprint | The thumbprint. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
virtual |
Determines whether the specified certificate has been revoked by the issuer.
issuer | The issuer. |
certificate | The certificate. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
virtual |
Parse the raw representation of a CRL.
Throws NotSupportedException. Must be implemented by subclass.
Is called by ServerManger.OnTrustListWrite with single elements of TrustListDataType.IssuerCrls.
derData | The raw data of the crl. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
virtual |
Removes the specified thumbprint.
thumbprint | The thumbprint. |
Implements UnifiedAutomation.UaBase.ICertificateStore.
|
get |
The name of the machine.
|
get |
The service name or user SID.
|
get |
The symbolic name for the store.
|
get |
Gets or sets the validation options.
The validation options.
|
get |
The type of windows store.