Saves the CertificateStore as a PFX encoded file.

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

Syntax

C#
public void ToPfxFile(
	string filename,
	string password,
	bool exportPrivateKeys
)
Visual Basic
Public Sub ToPfxFile ( _
	filename As String, _
	password As String, _
	exportPrivateKeys As Boolean _
)
Visual C++
public:
void ToPfxFile(
	String^ filename, 
	String^ password, 
	bool exportPrivateKeys
)

Parameters

filename
Type: System..::..String
The filename of the new PFX file.
password
Type: System..::..String
The password to use when encrypting the private keys.
exportPrivateKeys
Type: System..::..Boolean
true if the private keys should be exported [if possible], false otherwise.

Remarks

If the specified file already exists, the method will throw an exception.

Exceptions

ExceptionCondition
System..::..ArgumentNullExceptionfilename or password is a null reference (Nothing in Visual Basic).
LLCryptoLib.Security.Certificates..::..CertificateExceptionAn error occurs while exporting the certificate store.
System.IO..::..IOExceptionAn error occurs while writing the data to the file.

See Also