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

An S/MIME context that does not persist certificates, private keys or CRLs.
A TemporarySecureMimeContext is a special S/MIME context that does not use a persistent store for certificates, private keys, or CRLs. Instead, certificates, private keys, and CRLs are maintained in memory only.
Наследование: MimeKit.Cryptography.SecureMimeContext
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Import ( Stream stream, string password ) : void

Imports certificates and keys from a pkcs12-encoded stream.

Imports certificates and keys from a pkcs12-encoded stream.

Import ( X509Certificate certificate ) : void

Imports the specified certificate.

Imports the specified certificate.

Import ( X509Crl crl ) : void

Imports the specified certificate revocation list.

Imports the specified certificate revocation list.

TemporarySecureMimeContext ( ) : System

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

Creates a new TemporarySecureMimeContext.

Защищенные методы

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

Gets the X.509 certificate matching the specified selector.

Gets the first certificate that matches the specified selector.

GetCertificateRevocationLists ( ) : IX509Store

Gets the certificate revocation lists.

A Certificate Revocation List (CRL) is a list of certificate serial numbers issued by a particular Certificate Authority (CA) that have been revoked, either by the CA itself or by the owner of the revoked certificate.

GetCmsRecipient ( MimeKit.MailboxAddress mailbox ) : CmsRecipient

Gets the CmsRecipient for the specified mailbox.

Constructs a CmsRecipient with the appropriate certificate and CmsRecipient.EncryptionAlgorithms for the specified mailbox.

If the mailbox is a SecureMailboxAddress, the SecureMailboxAddress.Fingerprint property will be used instead of the mailbox address.

GetCmsSigner ( MimeKit.MailboxAddress mailbox, DigestAlgorithm digestAlgo ) : CmsSigner

Gets the CmsSigner for the specified mailbox.

Constructs a CmsSigner with the appropriate signing certificate for the specified mailbox.

If the mailbox is a SecureMailboxAddress, the SecureMailboxAddress.Fingerprint property will be used instead of the mailbox address for database lookups.

GetIntermediateCertificates ( ) : IX509Store

Gets the intermediate certificates.

An intermediate certificate is any certificate that exists between the root certificate issued by a Certificate Authority (CA) and the certificate at the end of the chain.

GetPrivateKey ( IX509Selector selector ) : AsymmetricKeyParameter

Gets the private key for the certificate matching the specified selector.

Gets the private key for the first certificate that matches the specified selector.

GetTrustedAnchors ( ) : Org.BouncyCastle.Utilities.Collections.HashSet

Gets the trusted anchors.

A trusted anchor is a trusted root-level X.509 certificate, generally issued by a certificate authority (CA).

UpdateSecureMimeCapabilities ( X509Certificate certificate, EncryptionAlgorithm algorithms, System.DateTime timestamp ) : void

Updates the known S/MIME capabilities of the client used by the recipient that owns the specified certificate.

Updates the known S/MIME capabilities of the client used by the recipient that owns the specified certificate.

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

GetCertificate() защищенный Метод

Gets the X.509 certificate matching the specified selector.
Gets the first certificate that matches the specified selector.
protected GetCertificate ( IX509Selector selector ) : X509Certificate
selector IX509Selector The search criteria for the certificate.
Результат Org.BouncyCastle.X509.X509Certificate

GetCertificateRevocationLists() защищенный Метод

Gets the certificate revocation lists.
A Certificate Revocation List (CRL) is a list of certificate serial numbers issued by a particular Certificate Authority (CA) that have been revoked, either by the CA itself or by the owner of the revoked certificate.
protected GetCertificateRevocationLists ( ) : IX509Store
Результат IX509Store

GetCmsRecipient() защищенный Метод

Gets the CmsRecipient for the specified mailbox.

Constructs a CmsRecipient with the appropriate certificate and CmsRecipient.EncryptionAlgorithms for the specified mailbox.

If the mailbox is a SecureMailboxAddress, the SecureMailboxAddress.Fingerprint property will be used instead of the mailbox address.

/// A certificate for the specified could not be found. ///
protected GetCmsRecipient ( MimeKit.MailboxAddress mailbox ) : CmsRecipient
mailbox MimeKit.MailboxAddress The mailbox.
Результат CmsRecipient

GetCmsSigner() защищенный Метод

Gets the CmsSigner for the specified mailbox.

Constructs a CmsSigner with the appropriate signing certificate for the specified mailbox.

If the mailbox is a SecureMailboxAddress, the SecureMailboxAddress.Fingerprint property will be used instead of the mailbox address for database lookups.

/// A certificate for the specified could not be found. ///
protected GetCmsSigner ( MimeKit.MailboxAddress mailbox, DigestAlgorithm digestAlgo ) : CmsSigner
mailbox MimeKit.MailboxAddress The mailbox.
digestAlgo DigestAlgorithm The preferred digest algorithm.
Результат CmsSigner

GetIntermediateCertificates() защищенный Метод

Gets the intermediate certificates.
An intermediate certificate is any certificate that exists between the root certificate issued by a Certificate Authority (CA) and the certificate at the end of the chain.
protected GetIntermediateCertificates ( ) : IX509Store
Результат IX509Store

GetPrivateKey() защищенный Метод

Gets the private key for the certificate matching the specified selector.
Gets the private key for the first certificate that matches the specified selector.
protected GetPrivateKey ( IX509Selector selector ) : AsymmetricKeyParameter
selector IX509Selector The search criteria for the private key.
Результат Org.BouncyCastle.Crypto.AsymmetricKeyParameter

GetTrustedAnchors() защищенный Метод

Gets the trusted anchors.
A trusted anchor is a trusted root-level X.509 certificate, generally issued by a certificate authority (CA).
protected GetTrustedAnchors ( ) : Org.BouncyCastle.Utilities.Collections.HashSet
Результат Org.BouncyCastle.Utilities.Collections.HashSet

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

Imports certificates and keys from a pkcs12-encoded stream.
Imports certificates and keys from a pkcs12-encoded stream.
/// is null. /// -or- /// is null. ///
public Import ( Stream stream, string password ) : void
stream Stream The raw certificate and key data in pkcs12 format.
password string The password to unlock the stream.
Результат void

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

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

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

Imports the specified certificate revocation list.
Imports the specified certificate revocation list.
/// is null. ///
public Import ( X509Crl crl ) : void
crl Org.BouncyCastle.X509.X509Crl The certificate revocation list.
Результат void

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

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

UpdateSecureMimeCapabilities() защищенный Метод

Updates the known S/MIME capabilities of the client used by the recipient that owns the specified certificate.
Updates the known S/MIME capabilities of the client used by the recipient that owns the specified certificate.
protected UpdateSecureMimeCapabilities ( X509Certificate certificate, EncryptionAlgorithm algorithms, System.DateTime timestamp ) : void
certificate Org.BouncyCastle.X509.X509Certificate The certificate.
algorithms EncryptionAlgorithm The encryption algorithm capabilities of the client (in preferred order).
timestamp System.DateTime The timestamp.
Результат void