ExportCertificate Method
Saves the current certificate to a PFX file.
Syntax
certmgr.exportCertificate(PFXFile, password, [callback])
Callback
The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).
The callback for this method is defined as:
function(err){ }
'err' is the error that occurred. If there was no error, then 'err' is 'null'.
'err' has 2 properties which hold detailed information:
err.code err.message
Remarks
This method will save the current certificate to a PFX file. The current certificate and its private key are saved to the file specified by PFXFile in PKCS12 format. The file contents are protected by Password.
In the Unix edition, the current certificate and its private key are saved to the file specified by PFXFile in PEM format. The private key is encrypted using the Password.