Click or drag to resize
MimeKit

DefaultSecureMimeContextImportAsync(Stream, Boolean, CancellationToken) Method

Asynchronously import a DER-encoded certificate stream.

Namespace: MimeKit.Cryptography
Assembly: MimeKit (in MimeKit.dll) Version: 4.3.0
Syntax
C#
public Task ImportAsync(
	Stream stream,
	bool trusted,
	CancellationToken cancellationToken = default
)

Parameters

stream  Stream
The raw certificate(s).
trusted  Boolean
true if the certificates are trusted; othewrwise, false.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Return Value

Task
An asynchronous task context.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
OperationCanceledException The operation was canceled via the cancellation token.
Remarks
Asynchronously imports the certificate(s).
See Also