X509CertificateStoreImport(String, String) Method

Imports certificates and private keys from the specified file.

Definition

Namespace: MimeKit.Cryptography
Assembly: MimeKit.Cryptography (in MimeKit.Cryptography.dll) Version: 5.0.0
C#
public void Import(
	string fileName,
	string password
)

Parameters

fileName  String
The name of the file to import.
password  String
The password to unlock the file.

Remarks

Imports certificates and private keys from the specified pkcs12 stream.

Exceptions

ArgumentNullException

fileName is .

-or-

password is .

ArgumentException fileName is a zero-length string, contains only white space, or contains one or more invalid characters.
FileNotFoundException The specified file could not be found.
UnauthorizedAccessException The user does not have access to read the specified file.
IOException An error occurred reading the file.

See Also