IApplication Pkcs 7MimeImport Async Method
Asynchronously import the certificates contained in the application/pkcs7-mime content.
Definition
Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
An asynchronous task context.
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
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
TaskAn asynchronous task context.
Remarks
Asynchronously imports the certificates contained in the application/pkcs7-mime content.
Exceptions
| ArgumentNullException | ctx is . |
| InvalidOperationException | The "smime-type" parameter on the Content-Type header is not "certs-only". |
| ObjectDisposedException | The IApplicationPkcs7Mime has been disposed. |
| OperationCanceledException | The operation was canceled via the cancellation token. |
| CmsException | An error occurred in the cryptographic message syntax subsystem. |