Click or drag to resize
MimeKit

ApplicationPkcs7MimeImportAsync Method

Asynchronously import the certificates contained in the application/pkcs7-mime content.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.7.1
Syntax
C#
public Task ImportAsync(
	SecureMimeContext ctx,
	CancellationToken cancellationToken = default
)

Parameters

ctx  SecureMimeContext
The S/MIME context to import certificates into.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.

Implements

IApplicationPkcs7MimeImportAsync(SecureMimeContext, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullExceptionctx is null.
InvalidOperationException The "smime-type" parameter on the Content-Type header is not "certs-only".
ObjectDisposedException The ApplicationPkcs7Mime has been disposed.
OperationCanceledException The operation was canceled via the cancellation token.
CmsException An error occurred in the cryptographic message syntax subsystem.
Remarks
Asynchronously imports the certificates contained in the application/pkcs7-mime content.
See Also