Click or drag to resize
MimeKit

SecureMimeContextImport Method (Stream, CancellationToken)

Import certificates (as from a certs-only application/pkcs-mime part) from the specified stream.

Namespace:  MimeKit.Cryptography
Assembly:  MimeKit (in MimeKit.dll) Version: 3.0.0
Syntax
C#
public override void Import(
	Stream stream,
	CancellationToken cancellationToken = default
)

Parameters

stream
Type: System.IOStream
The raw key data.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
The cancellation token.
Exceptions
ExceptionCondition
ArgumentNullExceptionstream is null.
OperationCanceledException The operation was cancelled via the cancellation token.
CmsException An error occurred in the cryptographic message syntax subsystem.
Remarks
Imports certificates (as from a certs-only application/pkcs-mime part) from the specified stream.
See Also