Click or drag to resize
MimeKit

DefaultSecureMimeContextImport(Stream, String, CancellationToken) Method

Imports certificates and keys from a pkcs12-encoded stream.

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

Parameters

stream  Stream
The raw certificate and key data.
password  String
The password to unlock the data.
cancellationToken  CancellationToken  (Optional)
The cancellation token.

Implements

ISecureMimeContextImport(Stream, String, CancellationToken)
Exceptions
ExceptionCondition
ArgumentNullException

stream is null.

-or-

password is null.

OperationCanceledException The operation was canceled via the cancellation token.
CmsException An error occurred in the cryptographic message syntax subsystem.
Remarks
Imports all of the certificates and keys from the pkcs12-encoded stream.
See Also