.NET Based OPC UA Client/Server SDK  3.1.0.500
UnifiedAutomation.UaBase.Certificate Class Reference

Represents an X509 certificate. More...

Inherits UnifiedAutomation.UaBase.ICertificate, and IFormattable.

Public Member Functions

 Certificate (string fileName)
 Initializes a new instance of the Certificate class. More...
 
 Certificate (byte[] privateKey, string password)
 Initializes a new instance of the Certificate class. More...
 
 Certificate (string fileName, string password)
 Initializes a new instance of the Certificate class. More...
 
 Certificate (byte[] bytes, bool extractIssuers=true)
 Initializes a new instance of the Certificate class. More...
 
 Certificate (X509Certificate2 certificate)
 Initializes a new instance of the Certificate class. More...
 
 Certificate (IntPtr handle)
 Initializes a new instance of the Certificate class. More...
 
byte[] GetRawData (bool includeChain=false)
 Gets the raw data. More...
 
override string ToString ()
 Returns a System.String that represents this instance. More...
 
string ToString (string format, IFormatProvider formatProvider)
 Returns a System.String that represents this instance. More...
 

Static Public Member Functions

static operator X509Certificate2 (Certificate certificate)
 Performs an explicit conversion from UnifiedAutomation.UaBase.Certificate to System.Security.Cryptography.X509Certificates.X509Certificate2. More...
 
static Certificate LoadPrivateKey (string filePath, string password)
 Loads a certificate from file. More...
 

Properties

string CommonName [get]
 Gets the common name. More...
 
string Thumbprint [get]
 Gets the thumbprint. More...
 
string SubjectName [get]
 Gets the subject name. More...
 
string IssuerName [get]
 Gets the issuer name. More...
 
DateTime ValidTo [get]
 Gets the expiry date. More...
 
DateTime ValidFrom [get]
 Gets the activation date. More...
 
string SerialNumber [get]
 Gets the serial number. More...
 
bool HasPrivateKey [get]
 Gets a value indicating whether this instance has private key. More...
 
bool IsCertificateAuthority [get]
 Gets a value indicating whether this instance is certificate authority. More...
 
bool IsApplicationCertificate [get]
 Gets a value indicating whether this instance is an application certificate. More...
 
bool IsSelfSigned [get]
 Gets a value indicating whether this certificate is self-signed. More...
 
X509ExtensionCollection Extensions [get]
 Gets the extensions. More...
 
string ApplicationUri [get]
 Gets the application URI. More...
 
IEnumerable< string > DomainNames [get]
 Gets the domain names. More...
 
object PublicKey [get]
 Gets the public key associated with the certificate. More...
 
object PrivateKey [get]
 Gets the private key associated with the certificate. More...
 
IList< ICertificateIssuers [get]
 The chain of issuers encoded with the certificate. More...
 
string StorePath [get, set]
 Gets or sets the store path. More...
 
CertificateValidationOptions ValidationOptions [get, set]
 Gets or sets the validation options. More...
 
X509Certificate2 InternalCertificate [get]
 Gets the internal certificate. More...
 
- Properties inherited from UnifiedAutomation.UaBase.ICertificate
string CommonName [get]
 Gets the common name. More...
 
string SubjectName [get]
 Gets the subject name. More...
 
string IssuerName [get]
 Gets the issuer name. More...
 
string Thumbprint [get]
 Gets the thumbprint. More...
 
string SerialNumber [get]
 Gets the serial number. More...
 
DateTime ValidTo [get]
 Gets the expiry date. More...
 
DateTime ValidFrom [get]
 Gets the activation date. More...
 
string ApplicationUri [get]
 Gets the application URI. More...
 
IEnumerable< string > DomainNames [get]
 Gets the domain names. More...
 
bool HasPrivateKey [get]
 Gets a value indicating whether this instance has private key. More...
 
bool IsCertificateAuthority [get]
 Gets a value indicating whether this instance is certificate authority. More...
 
bool IsApplicationCertificate [get]
 Gets a value indicating whether this instance is an application certificate. More...
 
bool IsSelfSigned [get]
 Gets a value indicating whether this certificate is self-signed. More...
 
object PublicKey [get]
 Gets the public key associated with the certificate. More...
 
object PrivateKey [get]
 Gets the private key associated with the certificate. More...
 
IList< ICertificateIssuers [get]
 The chain of issuers encoded with the certificate. More...
 
X509ExtensionCollection Extensions [get]
 Gets the extensions. More...
 
string StorePath [get, set]
 Gets or sets the store path. More...
 
CertificateValidationOptions ValidationOptions [get, set]
 Gets or sets the validation options. More...
 
X509Certificate2 InternalCertificate [get]
 Gets the internal certificate. More...
 

Detailed Description

Represents an X509 certificate.

Constructor & Destructor Documentation

UnifiedAutomation.UaBase.Certificate.Certificate ( string  fileName)
inline

Initializes a new instance of the Certificate class.

Parameters
fileNameName of the file.
UnifiedAutomation.UaBase.Certificate.Certificate ( byte[]  privateKey,
string  password 
)
inline

Initializes a new instance of the Certificate class.

Parameters
privateKeyA PKCS#12 encoded private key.
passwordThe password.
UnifiedAutomation.UaBase.Certificate.Certificate ( string  fileName,
string  password 
)
inline

Initializes a new instance of the Certificate class.

Parameters
fileNameName of the file.
passwordThe password.
UnifiedAutomation.UaBase.Certificate.Certificate ( byte[]  bytes,
bool  extractIssuers = true 
)
inline

Initializes a new instance of the Certificate class.

Parameters
bytesThe bytes.
extractIssuersIf true any issuers appended to the buffer are extracted.
UnifiedAutomation.UaBase.Certificate.Certificate ( X509Certificate2  certificate)
inline

Initializes a new instance of the Certificate class.

Parameters
certificateThe certificate.
UnifiedAutomation.UaBase.Certificate.Certificate ( IntPtr  handle)
inline

Initializes a new instance of the Certificate class.

Parameters
handleThe handle.

Member Function Documentation

byte [] UnifiedAutomation.UaBase.Certificate.GetRawData ( bool  includeChain = false)
inline

Gets the raw data.

Returns
The DER encoded form of the certificate.

Implements UnifiedAutomation.UaBase.ICertificate.

static Certificate UnifiedAutomation.UaBase.Certificate.LoadPrivateKey ( string  filePath,
string  password 
)
inlinestatic

Loads a certificate from file.

Parameters
filePathThe file path to a PFX file.
passwordThe clear text password. null if the certificate file is not password protected.
Returns
static UnifiedAutomation.UaBase.Certificate.operator X509Certificate2 ( Certificate  certificate)
inlineexplicitstatic

Performs an explicit conversion from UnifiedAutomation.UaBase.Certificate to System.Security.Cryptography.X509Certificates.X509Certificate2.

Parameters
certificateThe certificate.
Returns
The result of the conversion.
override string UnifiedAutomation.UaBase.Certificate.ToString ( )
inline

Returns a System.String that represents this instance.

Returns
A System.String that represents this instance.
string UnifiedAutomation.UaBase.Certificate.ToString ( string  format,
IFormatProvider  formatProvider 
)
inline

Returns a System.String that represents this instance.

Parameters
formatThe format.
formatProviderThe format provider.
Returns
A System.String that represents this instance.

Property Documentation

string UnifiedAutomation.UaBase.Certificate.ApplicationUri
get

Gets the application URI.

string UnifiedAutomation.UaBase.Certificate.CommonName
get

Gets the common name.

IEnumerable<string> UnifiedAutomation.UaBase.Certificate.DomainNames
get

Gets the domain names.

X509ExtensionCollection UnifiedAutomation.UaBase.Certificate.Extensions
get

Gets the extensions.

bool UnifiedAutomation.UaBase.Certificate.HasPrivateKey
get

Gets a value indicating whether this instance has private key.

true if this instance has private key; otherwise, false.

X509Certificate2 UnifiedAutomation.UaBase.Certificate.InternalCertificate
get

Gets the internal certificate.

bool UnifiedAutomation.UaBase.Certificate.IsApplicationCertificate
get

Gets a value indicating whether this instance is an application certificate.

true if this instance is an application certificate; otherwise, false.

bool UnifiedAutomation.UaBase.Certificate.IsCertificateAuthority
get

Gets a value indicating whether this instance is certificate authority.

true if this instance is certificate authority; otherwise, false.

bool UnifiedAutomation.UaBase.Certificate.IsSelfSigned
get

Gets a value indicating whether this certificate is self-signed.

true if this certificate is self-signed; otherwise, false.

string UnifiedAutomation.UaBase.Certificate.IssuerName
get

Gets the issuer name.

IList<ICertificate> UnifiedAutomation.UaBase.Certificate.Issuers
get

The chain of issuers encoded with the certificate.

The chain of issuers encoded with the certificate.

object UnifiedAutomation.UaBase.Certificate.PrivateKey
get

Gets the private key associated with the certificate.

The the private key associated with the certificate.

object UnifiedAutomation.UaBase.Certificate.PublicKey
get

Gets the public key associated with the certificate.

The the public key associated with the certificate.

string UnifiedAutomation.UaBase.Certificate.SerialNumber
get

Gets the serial number.

string UnifiedAutomation.UaBase.Certificate.StorePath
getset

Gets or sets the store path.

The store path.

string UnifiedAutomation.UaBase.Certificate.SubjectName
get

Gets the subject name.

string UnifiedAutomation.UaBase.Certificate.Thumbprint
get

Gets the thumbprint.

CertificateValidationOptions UnifiedAutomation.UaBase.Certificate.ValidationOptions
getset

Gets or sets the validation options.

The validation options.

DateTime UnifiedAutomation.UaBase.Certificate.ValidFrom
get

Gets the activation date.

DateTime UnifiedAutomation.UaBase.Certificate.ValidTo
get

Gets the expiry date.


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