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.10.0
Syntax
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

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