Mentalis.org Security Library documentation

CertificateStore.CreateFromPfxFile Method (String, String)

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

[Visual Basic]
Overloads Public Shared Function CreateFromPfxFile( _
   ByVal file As String, _
   ByVal password As String _
) As CertificateStore
[C#]
public static CertificateStore CreateFromPfxFile(
   string file,
   string password
);

Parameters

file
The full path to the PFX file.
password
The password used to encrypt the private key.

Return Value

A CertificateStore instance.

Remarks

Thanks go out to Chris Hudel for the implementation of this method.

Exceptions

Exception TypeCondition
ArgumentNullExceptionfile or password is a null reference (Nothing in Visual Basic).
IOExceptionAn error occurs whil reading from the specified file.
CertificateExceptionAn error occurs while loading the PFX file.

See Also

CertificateStore Class | Org.Mentalis.Security.Certificates Namespace | CertificateStore.CreateFromPfxFile Overload List