Create a PFX (PKCS-12) file from an X.509 certificate and (optional) encrypted private key file
with advanced options.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static int MakeFile(
string fileToMake,
string certFile,
string privateKeyFile,
string password,
string friendlyName,
PfxOptions pfxOptions
)
Public Shared Function MakeFile (
fileToMake As String,
certFile As String,
privateKeyFile As String,
password As String,
friendlyName As String,
pfxOptions As PfxOptions
) As Integer
Parameters
- fileToMake String
- name of output file to be created
- certFile String
- filename of the subject's X.509 certificate (required)
- privateKeyFile String
- filename of the subject's encrypted private key in pkcs-8 format (optional)
- password String
- password for private key file and new PFX file
- friendlyName String
- friendly name identification for the subject (optional)
- pfxOptions PfxOptions
- Specialist options
Return Value
Int32Zero if successful or a non-zero
error code.
RemarksThe default behaviour is to encrypt the certificate using "weak" 40-bit RC2 and the private key (if provided) using
"standard" Triple DES (pbeWithSHAAnd3-KeyTripleDES-CBC).
See Also