C# Class Opc.Ua.CertificateIdentifier

The identifier for an X509 certificate.
Inheritance: IFormattable
Afficher le fichier Open project: OPCFoundation/UA-.NETStandardLibrary Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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.
Résultat byte[]

Equals() public méthode

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

Find() public méthode

Finds a certificate in a store.
public Find ( ) : Task
Résultat Task

Find() public méthode

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.
Résultat Task

Find() public static méthode

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].
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2

GetHashCode() public méthode

Returns a suitable hash code.
public GetHashCode ( ) : int
Résultat int

GetPrivateKeyFilePath() public méthode

Gets the private key file path.
public GetPrivateKeyFilePath ( ) : Task
Résultat Task

LoadPrivateKey() public méthode

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

OpenStore() public méthode

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

ParseBlob() public static méthode

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.
Résultat System.Security.Cryptography.X509Certificates.X509Certificate2Collection

ToString() public méthode

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

ToString() public méthode

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.
Résultat string