C# Class NIST.DMC.CertificatesManager

CertificatesManager provides access to the user's local store of certificates
Mostra file Open project: usnistgov/DT4SM Class Usage Examples

Public Methods

Method Description
AddCertificate ( X509Certificate2 certificate ) : void

Adds a certificate in the user's local store

AddCertificate ( string filePath ) : void

Adds a certificate in the user's local store

AddProtectedCertificate ( string filePath, string password ) : void

Adds a protected certificate in the user's local store

FindByFriendlyName ( string friendlyName ) : X509Certificate2

Finds a certificate, in the user's local store, by its friendly name

GetCertificates ( ) : List

Retrieves the user's local certificates

Method Details

AddCertificate() public static method

Adds a certificate in the user's local store
public static AddCertificate ( X509Certificate2 certificate ) : void
certificate System.Security.Cryptography.X509Certificates.X509Certificate2 Certificate to add to the store
return void

AddCertificate() public static method

Adds a certificate in the user's local store
public static AddCertificate ( string filePath ) : void
filePath string Path to the file containing the certificate to add
return void

AddProtectedCertificate() public static method

Adds a protected certificate in the user's local store
public static AddProtectedCertificate ( string filePath, string password ) : void
filePath string Path to the file that contains the certificate
password string Password to access the certificate data
return void

FindByFriendlyName() public static method

Finds a certificate, in the user's local store, by its friendly name
public static FindByFriendlyName ( string friendlyName ) : X509Certificate2
friendlyName string Friendly name of the certificates
return System.Security.Cryptography.X509Certificates.X509Certificate2

GetCertificates() public static method

Retrieves the user's local certificates
public static GetCertificates ( ) : List
return List