Creates a new certificate store from a PFX/P12 encoded file.
Namespace: LLCryptoLib.Security.CertificatesAssembly: LLCryptoLib (in LLCryptoLib.dll) Version: 2.0.1024.0 (2.0.1024)
Syntax
C# |
---|
public static CertificateStore CreateFromPfxFile(
string file,
string password,
bool exportable
) |
Visual Basic |
---|
Public Shared Function CreateFromPfxFile ( _
file As String, _
password As String, _
exportable As Boolean _
) As CertificateStore |
Visual C++ |
---|
public:
static CertificateStore^ CreateFromPfxFile(
String^ file,
String^ password,
bool exportable
) |
Parameters
- file
- Type: System..::..String
The full path to the PFX file.
- password
- Type: System..::..String
The password used to encrypt the private key.
- exportable
- Type: System..::..Boolean
true if the private keys associated with the certificates should be marked as exportable, false otherwise.
Return Value
A
CertificateStore instance.
Exceptions
Exception | Condition |
---|
System..::..ArgumentNullException | file or password is a null reference (Nothing in Visual Basic). |
System.IO..::..IOException | An error occurs whil reading from the specified file. |
LLCryptoLib.Security.Certificates..::..CertificateException | An error occurs while loading the PFX file. |
System..::..ArgumentException | password is invalid. |
See Also