CryptoSys PKI Pro Manual

Pfx.MakeFile Method

Create a PFX (PKCS-12) file from an X.509 certificate and (optional) encrypted private key file with advanced options.

Syntax

[C#]
public static int MakeFile(
	string fileToMake,
	string certFile,
	string privateKeyFile,
	string password,
	string friendlyName,
	Pfx.Options pfxOptions
)
[VB.NET]
Public Shared Function MakeFile ( _
	fileToMake As String, _
	certFile As String, _
	privateKeyFile As String, _
	password As String, _
	friendlyName As String, _
	pfxOptions As Pfx.Options _
) As Integer

Parameters

fileToMake
name of output file to be created
certFile
filename of the subject's X.509 certificate (required)
privateKeyFile
filename of the subject's encrypted private key in pkcs-8 format (optional)
password
password for private key file and new PFX file
friendlyName
friendly name identification for the subject (optional)
pfxOptions
Type: Pfx.Options
Specialist options

Return Value

Zero if successful or a non-zero error code.

Remarks

The 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

VB6/C equivalent: PFX_MakeFile

[Contents] [Index]

[PREV: Pem.FileToBinFile Method...]   [Contents]   [Index]   
   [NEXT: Pfx.SignatureIsValid Method...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.