Default Secure Mime ContextImport Async(Stream, Boolean, Cancellation Token) Method
Asynchronously import a DER-encoded certificate stream.
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#
public Task ImportAsync(
Stream stream,
bool trusted,
CancellationToken cancellationToken = default
)Parameters
- stream Stream
- The raw certificate(s).
- trusted Boolean
- if the certificates are trusted; othewrwise, .
- cancellationToken CancellationToken (Optional)
- The cancellation token.
Return Value
TaskAn asynchronous task context.
Remarks
Asynchronously imports the certificate(s).
Exceptions
| ArgumentNullException | stream is . |
| OperationCanceledException | The operation was canceled via the cancellation token. |