C# Класс MimeKit.Cryptography.X509CertificateStore

A store for X.509 certificates and keys.
A store for X.509 certificates and keys.
Наследование: IX509Store
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Add ( X509Certificate certificate ) : void

Adds the specified certificate to the store.

Adds the specified certificate to the store.

AddRange ( IEnumerable certificates ) : void

Adds the specified range of certificates to the store.

Adds the specified range of certificates to the store.

Export ( Stream stream ) : void

Exports the certificates to an unencrypted stream.

Exports the certificates to an unencrypted stream.

Export ( Stream stream, string password ) : void

Exports the specified stream and password to a pkcs12 encrypted file.

Exports the specified stream and password to a pkcs12 encrypted file.

Export ( string fileName ) : void

Exports the certificates to an unencrypted file.

Exports the certificates to an unencrypted file.

Export ( string fileName, string password ) : void

Exports the specified stream and password to a pkcs12 encrypted file.

Exports the specified stream and password to a pkcs12 encrypted file.

GetMatches ( IX509Selector selector ) : IEnumerable

Gets an enumerator of matching X.509 certificates based on the specified selector.

Gets an enumerator of matching X.509 certificates based on the specified selector.

GetPrivateKey ( X509Certificate certificate ) : AsymmetricKeyParameter

Gets the private key for the specified certificate.

Gets the private key for the specified certificate, if it exists.

Import ( Stream stream ) : void

Imports the certificate(s) from the specified stream.

Imports the certificate(s) from the specified stream.

Import ( Stream stream, string password ) : void

Imports certificates and private keys from the specified stream.

Imports certificates and private keys from the specified pkcs12 stream.

Import ( byte rawData ) : void

Imports the certificate(s) from the specified byte array.

Imports the certificate(s) from the specified byte array.

Import ( byte rawData, string password ) : void

Imports certificates and private keys from the specified byte array.

Imports certificates and private keys from the specified pkcs12 stream.

Import ( string fileName ) : void

Imports the certificate(s) from the specified file.

Imports the certificate(s) from the specified file.

Import ( string fileName, string password ) : void

Imports certificates and private keys from the specified file.

Imports certificates and private keys from the specified pkcs12 stream.

Remove ( X509Certificate certificate ) : void

Removes the specified certificate from the store.

Removes the specified certificate from the store.

RemoveRange ( IEnumerable certificates ) : void

Removes the specified range of certificates from the store.

Removes the specified range of certificates from the store.

X509CertificateStore ( ) : System

Initializes a new instance of the MimeKit.Cryptography.X509CertificateStore class.

Creates a new X509CertificateStore.

Приватные методы

Метод Описание
IX509Store ( IX509Selector selector ) : ICollection

Gets a collection of matching X.509 certificates based on the specified selector.

Gets a collection of matching X.509 certificates based on the specified selector.

Описание методов

Add() публичный Метод

Adds the specified certificate to the store.
Adds the specified certificate to the store.
/// is null. ///
public Add ( X509Certificate certificate ) : void
certificate Org.BouncyCastle.X509.X509Certificate The certificate.
Результат void

AddRange() публичный Метод

Adds the specified range of certificates to the store.
Adds the specified range of certificates to the store.
/// is null. ///
public AddRange ( IEnumerable certificates ) : void
certificates IEnumerable The certificates.
Результат void

Export() публичный Метод

Exports the certificates to an unencrypted stream.
Exports the certificates to an unencrypted stream.
/// is null. /// /// An error occurred while writing to the stream. ///
public Export ( Stream stream ) : void
stream Stream The output stream.
Результат void

Export() публичный Метод

Exports the specified stream and password to a pkcs12 encrypted file.
Exports the specified stream and password to a pkcs12 encrypted file.
/// is null. /// -or- /// is null. /// /// An error occurred while writing to the stream. ///
public Export ( Stream stream, string password ) : void
stream Stream The output stream.
password string The password to use to lock the private keys.
Результат void

Export() публичный Метод

Exports the certificates to an unencrypted file.
Exports the certificates to an unencrypted file.
/// is null. /// /// is a zero-length string, contains only white space, or /// contains one or more invalid characters as defined by /// . /// /// The specified path exceeds the maximum allowed path length of the system. /// /// A directory in the specified path does not exist. /// /// The user does not have access to create the specified file. /// /// An error occurred while writing to the stream. ///
public Export ( string fileName ) : void
fileName string The file path to write to.
Результат void

Export() публичный Метод

Exports the specified stream and password to a pkcs12 encrypted file.
Exports the specified stream and password to a pkcs12 encrypted file.
/// is null. /// -or- /// is null. /// /// is a zero-length string, contains only white space, or /// contains one or more invalid characters as defined by /// . /// /// The specified path exceeds the maximum allowed path length of the system. /// /// A directory in the specified path does not exist. /// /// The user does not have access to create the specified file. /// /// An error occurred while writing to the stream. ///
public Export ( string fileName, string password ) : void
fileName string The file path to write to.
password string The password to use to lock the private keys.
Результат void

GetMatches() публичный Метод

Gets an enumerator of matching X.509 certificates based on the specified selector.
Gets an enumerator of matching X.509 certificates based on the specified selector.
public GetMatches ( IX509Selector selector ) : IEnumerable
selector IX509Selector The match criteria.
Результат IEnumerable

GetPrivateKey() публичный Метод

Gets the private key for the specified certificate.
Gets the private key for the specified certificate, if it exists.
public GetPrivateKey ( X509Certificate certificate ) : AsymmetricKeyParameter
certificate Org.BouncyCastle.X509.X509Certificate The certificate.
Результат Org.BouncyCastle.Crypto.AsymmetricKeyParameter

Import() публичный Метод

Imports the certificate(s) from the specified stream.
Imports the certificate(s) from the specified stream.
/// is null. /// /// An error occurred reading the stream. ///
public Import ( Stream stream ) : void
stream Stream The stream to import.
Результат void

Import() публичный Метод

Imports certificates and private keys from the specified stream.

Imports certificates and private keys from the specified pkcs12 stream.

/// is null. /// -or- /// is null. /// /// An error occurred reading the stream. ///
public Import ( Stream stream, string password ) : void
stream Stream The stream to import.
password string The password to unlock the stream.
Результат void

Import() публичный Метод

Imports the certificate(s) from the specified byte array.
Imports the certificate(s) from the specified byte array.
/// is null. ///
public Import ( byte rawData ) : void
rawData byte The raw certificate data.
Результат void

Import() публичный Метод

Imports certificates and private keys from the specified byte array.

Imports certificates and private keys from the specified pkcs12 stream.

/// is null. /// -or- /// is null. ///
public Import ( byte rawData, string password ) : void
rawData byte The raw certificate data.
password string The password to unlock the raw data.
Результат void

Import() публичный Метод

Imports the certificate(s) from the specified file.
Imports the certificate(s) from the specified file.
/// is null. /// /// The specified file could not be found. /// /// An error occurred reading the file. ///
public Import ( string fileName ) : void
fileName string The name of the file to import.
Результат void

Import() публичный Метод

Imports certificates and private keys from the specified file.

Imports certificates and private keys from the specified pkcs12 stream.

/// is null. /// -or- /// is null. /// /// is a zero-length string, contains only white space, or /// contains one or more invalid characters as defined by /// . /// /// The specified file could not be found. /// /// The user does not have access to read the specified file. /// /// An error occurred reading the file. ///
public Import ( string fileName, string password ) : void
fileName string The name of the file to import.
password string The password to unlock the file.
Результат void

Remove() публичный Метод

Removes the specified certificate from the store.
Removes the specified certificate from the store.
/// is null. ///
public Remove ( X509Certificate certificate ) : void
certificate Org.BouncyCastle.X509.X509Certificate The certificate.
Результат void

RemoveRange() публичный Метод

Removes the specified range of certificates from the store.
Removes the specified range of certificates from the store.
/// is null. ///
public RemoveRange ( IEnumerable certificates ) : void
certificates IEnumerable The certificates.
Результат void

X509CertificateStore() публичный Метод

Initializes a new instance of the MimeKit.Cryptography.X509CertificateStore class.
Creates a new X509CertificateStore.
public X509CertificateStore ( ) : System
Результат System