C# Class Opc.Ua.CertificateIdentifier

The identifier for an X509 certificate.
Inheritance: IFormattable
ファイルを表示 Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Public Methods

Method Description
CreateBlob ( IList certificates ) : byte[]

Creates a DER blob from a certificate with zero or more supporting certificates.

Equals ( object obj ) : bool

Returns true if the objects are equal.

Find ( ) : Task

Finds a certificate in a store.

Find ( bool needPrivateKey ) : Task

Finds a certificate in a store.

Find ( X509Certificate2Collection collection, string thumbprint, string subjectName, bool needPrivateKey ) : X509Certificate2

Finds a certificate in the specified collection.

GetHashCode ( ) : int

Returns a suitable hash code.

GetPrivateKeyFilePath ( ) : Task

Gets the private key file path.

LoadPrivateKey ( String password ) : Task

Loads the private key for the certificate with an optional password.

OpenStore ( ) : ICertificateStore

Returns an object that can be used to access the store containing the certificate.

ParseBlob ( byte encodedData ) : X509Certificate2Collection

Parses a blob with a list of DER encoded certificates.

Any supporting certificates found in the buffer are processed as well.

ToString ( ) : string

Returns a T:System.String that represents the current T:System.Object.

ToString ( string format, IFormatProvider formatProvider ) : string

Formats the value of the current instance using the specified format.

Private Methods

Method Description
GetDisplayName ( X509Certificate2 certificate ) : string

Returns a display name for a certificate.

IsValidCertificateBlob ( byte rawData ) : bool

Checks if the certificate data represents a valid X509v3 certificate.

Paste ( CertificateIdentifier certificate ) : void

Updates the object from another object (usage is not updated).

Method Details

CreateBlob() public static method

Creates a DER blob from a certificate with zero or more supporting certificates.
If the is null or empty.
public static CreateBlob ( IList certificates ) : byte[]
certificates IList The certificates list to be returned as raw data.
return byte[]

Equals() public method

Returns true if the objects are equal.
public Equals ( object obj ) : bool
obj object
return bool

Find() public method

Finds a certificate in a store.
public Find ( ) : Task
return Task

Find() public method

Finds a certificate in a store.
public Find ( bool needPrivateKey ) : Task
needPrivateKey bool if set to true the returned certificate must contain the private key.
return Task

Find() public static method

Finds a certificate in the specified collection.
public static Find ( X509Certificate2Collection collection, string thumbprint, string subjectName, bool needPrivateKey ) : X509Certificate2
collection System.Security.Cryptography.X509Certificates.X509Certificate2Collection The collection.
thumbprint string The thumbprint of the certificate.
subjectName string Subject name of the certificate.
needPrivateKey bool if set to true [need private key].
return System.Security.Cryptography.X509Certificates.X509Certificate2

GetHashCode() public method

Returns a suitable hash code.
public GetHashCode ( ) : int
return int

GetPrivateKeyFilePath() public method

Gets the private key file path.
public GetPrivateKeyFilePath ( ) : Task
return Task

LoadPrivateKey() public method

Loads the private key for the certificate with an optional password.
public LoadPrivateKey ( String password ) : Task
password String
return Task

OpenStore() public method

Returns an object that can be used to access the store containing the certificate.
public OpenStore ( ) : ICertificateStore
return ICertificateStore

ParseBlob() public static method

Parses a blob with a list of DER encoded certificates.
Any supporting certificates found in the buffer are processed as well.
public static ParseBlob ( byte encodedData ) : X509Certificate2Collection
encodedData byte The encoded data.
return System.Security.Cryptography.X509Certificates.X509Certificate2Collection

ToString() public method

Returns a T:System.String that represents the current T:System.Object.
public ToString ( ) : string
return string

ToString() public method

Formats the value of the current instance using the specified format.
public ToString ( string format, IFormatProvider formatProvider ) : string
format string The specifying the format to use. /// -or- /// null to use the default format defined for the type of the implementation.
formatProvider IFormatProvider The to use to format the value. /// -or- /// null to obtain the numeric format information from the current locale setting of the operating system.
return string