UA Bundle SDK .NET  2.2.1.258
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Groups Pages
UnifiedAutomation.UaBase.WindowsCertificateStore Class Reference

Provides access to a simple file based certificate store. More...

Inherits UnifiedAutomation.UaBase.ICertificateStore.

Public Member Functions

 WindowsCertificateStore (string storePath)
 Initializes a new instance of the WindowsCertificateStore class. More...
 
void Dispose ()
 May be called by the application to clean up resources. More...
 
ICertificate Find (string thumbprint)
 Finds a certificate in the store. More...
 
ICertificate Find (string thumbprint, bool needPrivateKey)
 Finds a certificate in the store. More...
 
ICertificate Find (string subjectName, string thumbprint, bool needPrivateKey)
 Finds a certificate in the store. More...
 
void Add (ICertificate certificate, bool replaceExisting, bool savePrivateKey)
 Adds the specified certificate to the store. More...
 
void Remove (string thumbprint)
 Removes the specified thumbprint. More...
 
StatusCode IsRevoked (ICertificate issuer, ICertificate certificate)
 Determines whether the specified certificate has been revoked by the issuer. More...
 
string GetPrivateKeyFilePath (string thumbprint)
 Gets the private key file path. More...
 
IEnumerator< ICertificateGetEnumerator ()
 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 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...
 
string StoreType [get]
 Gets the store type. More...
 
string StorePath [get]
 Gets the store path. More...
 
CertificateValidationOptions ValidationOptions [get, set]
 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, set]
 Gets or sets the validation options. More...
 

Detailed Description

Provides access to a simple file based certificate store.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.WindowsCertificateStore.WindowsCertificateStore ( string  storePath)
inline

Initializes a new instance of the WindowsCertificateStore class.

Parameters
storePathThe store path.

Syntax (items enclosed in [] are optional):
[\HostName\]StoreType[\(ServiceName | UserSid)]\SymbolicName

HostName
the name of the machine where the store resides.
SymbolicName
one of LocalMachine, CurrentUser, User or Service
ServiceName
the name of an NT service.
UserSid
the SID for a user account.
SymbolicName
the symbolic name of the store (e.g. My, Root, Trust, CA, etc.).

Examples:
\MYPC\LocalMachine\My
CurrentUser\Trust
\MYPC\Service\My UA Server\UA Applications
User\S-1-5-25\Root

Member Function Documentation

void UnifiedAutomation.UaBase.WindowsCertificateStore.Add ( ICertificate  certificate,
bool  replaceExisting,
bool  savePrivateKey 
)
inline

Adds the specified certificate to the store.

Parameters
certificateThe certificate.
replaceExistingif set to true any existing certificate is replaced.
savePrivateKeyif set to true any private key is saved as well.

Implements UnifiedAutomation.UaBase.ICertificateStore.

void UnifiedAutomation.UaBase.WindowsCertificateStore.Dispose ( )
inline

May be called by the application to clean up resources.

virtual void UnifiedAutomation.UaBase.WindowsCertificateStore.Dispose ( bool  disposing)
inlineprotectedvirtual

Cleans up all resources held by the object.

static IList<WindowsCertificateStore> UnifiedAutomation.UaBase.WindowsCertificateStore.EnumerateStores ( WindowsStoreType  storeType,
string  hostName,
string  serviceNameOrUserSid 
)
inlinestatic

Enumerates the available windows certificate store.

ICertificate UnifiedAutomation.UaBase.WindowsCertificateStore.Find ( string  thumbprint)
inline

Finds a certificate in the store.

Parameters
thumbprintThe thumbprint.
Returns
The certificate; null if not found.

Implements UnifiedAutomation.UaBase.ICertificateStore.

ICertificate UnifiedAutomation.UaBase.WindowsCertificateStore.Find ( string  thumbprint,
bool  needPrivateKey 
)
inline

Finds a certificate in the store.

Parameters
thumbprintThe thumbprint.
needPrivateKeyif set to true the certificate is only returned if a private key is accessible.
Returns
The certificate; null if not found.

Implements UnifiedAutomation.UaBase.ICertificateStore.

ICertificate UnifiedAutomation.UaBase.WindowsCertificateStore.Find ( string  subjectName,
string  thumbprint,
bool  needPrivateKey 
)
inline

Finds a certificate in the store.

Parameters
subjectNameThe subject name.
thumbprintThe thumbprint.
needPrivateKeyif set to true the certificate is only returned if a private key is accessible.
Returns

Implements UnifiedAutomation.UaBase.ICertificateStore.

string UnifiedAutomation.UaBase.WindowsCertificateStore.Format ( )
inline

Returns the string representation of the store.

IEnumerator<ICertificate> UnifiedAutomation.UaBase.WindowsCertificateStore.GetEnumerator ( )
inline

Returns an enumerator that iterates through the collection.

Returns
A T:System.Collections.Generic.IEnumerator`1 that can be used to iterate through the collection.
string UnifiedAutomation.UaBase.WindowsCertificateStore.GetPrivateKeyFilePath ( string  thumbprint)
inline

Gets the private key file path.

Parameters
thumbprintThe thumbprint.
Returns

Implements UnifiedAutomation.UaBase.ICertificateStore.

StatusCode UnifiedAutomation.UaBase.WindowsCertificateStore.IsRevoked ( ICertificate  issuer,
ICertificate  certificate 
)
inline

Determines whether the specified certificate has been revoked by the issuer.

Parameters
issuerThe issuer.
certificateThe certificate.
Returns
Good if the certificate is fine. An error status if a problem occurred.

Implements UnifiedAutomation.UaBase.ICertificateStore.

void UnifiedAutomation.UaBase.WindowsCertificateStore.Remove ( string  thumbprint)
inline

Removes the specified thumbprint.

Parameters
thumbprintThe thumbprint.

Implements UnifiedAutomation.UaBase.ICertificateStore.

Property Documentation

string UnifiedAutomation.UaBase.WindowsCertificateStore.HostName
get

The name of the machine.

string UnifiedAutomation.UaBase.WindowsCertificateStore.ServiceNameOrUserSid
get

The service name or user SID.

string UnifiedAutomation.UaBase.WindowsCertificateStore.StorePath
get

Gets the store path.

string UnifiedAutomation.UaBase.WindowsCertificateStore.StoreType
get

Gets the store type.

string UnifiedAutomation.UaBase.WindowsCertificateStore.SymbolicName
get

The symbolic name for the store.

CertificateValidationOptions UnifiedAutomation.UaBase.WindowsCertificateStore.ValidationOptions
getset

Gets or sets the validation options.

The validation options.

WindowsStoreType UnifiedAutomation.UaBase.WindowsCertificateStore.WindowsStoreType
get

The type of windows store.


The documentation for this class was generated from the following file: