Creates a new certificate store from a PFX/P12 encoded file.

Namespace: LLCryptoLib.Security.Certificates
Assembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)

Syntax

C#
public static CertificateStore CreateFromPfxFile(
	string file,
	string password
)
Visual Basic
Public Shared Function CreateFromPfxFile ( _
	file As String, _
	password As String _
) As CertificateStore
Visual C++
public:
static CertificateStore^ CreateFromPfxFile(
	String^ file, 
	String^ password
)

Parameters

file
Type: System..::..String
The full path to the PFX file.
password
Type: System..::..String
The password used to encrypt the private key.

Return Value

A CertificateStore instance.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionfile or password is a null reference (Nothing in Visual Basic).
System.IO..::..IOExceptionAn error occurs whil reading from the specified file.
LLCryptoLib.Security.Certificates..::..CertificateExceptionAn error occurs while loading the PFX file.
System..::..ArgumentExceptionpassword is invalid.

See Also