SecureMimeContextImportAsync(X509Certificate2, CancellationToken) Method

Asynchronously import a certificate.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public virtual Task ImportAsync(
	X509Certificate2 certificate,
	CancellationToken cancellationToken = default
)

Parameters

certificate  X509Certificate2
The certificate.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Implements

ISecureMimeContextImportAsync(X509Certificate2, CancellationToken)

Remarks

Asynchronously imports a certificate.

Exceptions

ArgumentNullException certificate is .
OperationCanceledException The operation was cancelled via the cancellation token.

See Also