Saves the Certificate as a PFX encoded file.
[Visual Basic]
Public Sub ToPfxFile( _
ByVal filename As String, _
ByVal password As String, _
ByVal withPrivateKeys As Boolean, _
ByVal withParents As Boolean _
)
If the specified file already exists, the method will throw an exception.
Exception Type | Condition |
---|---|
ArgumentNullException | filename or password is a null reference (Nothing in Visual Basic). |
IOException | An error occurs while writing the data to the file. |
CertificateException | An error occurs while exporting the certificate store -or- an error occurs while building the certificate chain -or- an error occurs while creating the store -or- an error occurs while adding the certificate to the store. |
Certificate Class | Certificate Members | Org.Mentalis.Security.Certificates Namespace