DefaultSecureMimeContextImport(Stream, Boolean, CancellationToken) Method

Import a DER-encoded certificate stream.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public void Import(
	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.

Remarks

Imports the certificate(s).

Exceptions

ArgumentNullException stream is .
OperationCanceledException The operation was canceled via the cancellation token.

See Also