.NET Based OPC UA Client/Server SDK  3.0.10.493
UnifiedAutomation.UaBase.CertificateFactory Class Reference

Provides helper functions used to create and revoke certificates. More...

Public Member Functions

 CertificateFactory (ISecurityProvider provider)
 
void Dispose ()
 
ICertificate CreateCertificate (string storePath, CreateCertificateSettings settings)
 Creates a new certificate. More...
 
byte[] CreateCertificateRequest (CertificateKeyPair requestor, CreateRequestSettings settings)
 Creates a certificate signing request. More...
 
ICertificate UpdateCertificate (ICertificate certificateWithoutPrivateKey, ICertificate oldCertificate)
 

Static Public Member Functions

static ICertificate Create (ISecurityProvider provider, string storePath, CreateCertificateSettings settings)
 Creates a new certificate. More...
 
static void Revoke (ISecurityProvider securityProvider, string storePath, string thumbprint, string password, ICertificate certificate)
 Revokes the certificate. More...
 
static CertificateKeyPair Convert (CertificateKeyPair input, string newPassword, string newKeyFormat)
 Converts a certificate from one format to another. More...
 
static ICertificate Replace (ICertificate newCertificate, ICertificate existingCertificate)
 Replaces the certificate in a PFX file. More...
 
static ICertificate Sign (byte[] certificateRequest, CertificateKeyPair issuer, SignCertificateSettings settings)
 Signs an existing certificate by the CA. More...
 
static byte[] CreateRequest (CertificateKeyPair requestor, CreateRequestSettings settings)
 Creates a certificate signing request. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 

Properties

ISecurityProvider SecurityProvider [get]
 
static string CertificateGeneratorPath [get, set]
 Gets or sets the path to the certificate generator. More...
 
static string TempFileFolder [get, set]
 Gets or sets the path to store files used to pass arguments to the certificate generator. More...
 

Detailed Description

Provides helper functions used to create and revoke certificates.

Member Function Documentation

static CertificateKeyPair UnifiedAutomation.UaBase.CertificateFactory.Convert ( CertificateKeyPair  input,
string  newPassword,
string  newKeyFormat 
)
inlinestatic

Converts a certificate from one format to another.

Parameters
inputThe input certificate.
newPasswordThe password on the output certificate.
newKeyFormatThe new key format.
Returns
The new certificate.
static ICertificate UnifiedAutomation.UaBase.CertificateFactory.Create ( ISecurityProvider  provider,
string  storePath,
CreateCertificateSettings  settings 
)
inlinestatic

Creates a new certificate.

Parameters
provider
storePathThe store path.
settingsSpecified the contents of the certificate.
Returns
The new certificate.
ICertificate UnifiedAutomation.UaBase.CertificateFactory.CreateCertificate ( string  storePath,
CreateCertificateSettings  settings 
)
inline

Creates a new certificate.

Parameters
storePathThe store path.
settingsSpecified the contents of the certificate.
Returns
The new certificate.
byte [] UnifiedAutomation.UaBase.CertificateFactory.CreateCertificateRequest ( CertificateKeyPair  requestor,
CreateRequestSettings  settings 
)
inline

Creates a certificate signing request.

Parameters
requestorThe requestor.
settingsThe settings.
Returns
The certificate signing request.
static byte [] UnifiedAutomation.UaBase.CertificateFactory.CreateRequest ( CertificateKeyPair  requestor,
CreateRequestSettings  settings 
)
inlinestatic

Creates a certificate signing request.

Parameters
requestorThe requestor.
settingsThe settings.
Returns
The certificate signing request.
static ICertificate UnifiedAutomation.UaBase.CertificateFactory.Replace ( ICertificate  newCertificate,
ICertificate  existingCertificate 
)
inlinestatic

Replaces the certificate in a PFX file.

Parameters
newCertificateThe new certificate.
existingCertificateThe existing certificate with a private key.
Returns
The new certificate with a private key.
static void UnifiedAutomation.UaBase.CertificateFactory.Revoke ( ISecurityProvider  securityProvider,
string  storePath,
string  thumbprint,
string  password,
ICertificate  certificate 
)
inlinestatic

Revokes the certificate.

Parameters
securityProvider
storePathThe store path.
thumbprintThe thumbprint.
passwordThe password.
certificateThe certificate.
static ICertificate UnifiedAutomation.UaBase.CertificateFactory.Sign ( byte[]  certificateRequest,
CertificateKeyPair  issuer,
SignCertificateSettings  settings 
)
inlinestatic

Signs an existing certificate by the CA.

Parameters
certificateRequestThe certificate request.
issuerThe issuer.
settingsThe settings.
Returns
The signed certificate.

Property Documentation

string UnifiedAutomation.UaBase.CertificateFactory.CertificateGeneratorPath
staticgetset

Gets or sets the path to the certificate generator.

The path to the certificate generator.

If this value is not set then the default location is same directory as the UaBase assembly.

string UnifiedAutomation.UaBase.CertificateFactory.TempFileFolder
staticgetset

Gets or sets the path to store files used to pass arguments to the certificate generator.

The path to store files used to pass arguments to the certificate generator.

If this value is not set then then the user's temp folder is used.

Note that these file will contain secrets like passwords and private and should be created in a safe location with appropriate file permissions set. The SemaphoreFileLock is used to synchronize access to the single file.


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