CryptoSys PKI Pro Manual

X509.GetP7ChainFromPFX Method

Extract all X.509 certificates from a PKCS-12 PFX/.p12 file, saving the output directly as a new PKCS-7 "certs-only" certificate chain file.

Syntax

[C#]
public static int GetP7ChainFromPFX(
   string outputFile,
   string inputFile,
   string password 
)
[VB]
Public Shared Function GetP7ChainFromPFX (
   outputFile As String,
   inputFile As String,
   password As String 
) As Integer

Parameters

outputFile  String
Name of output file to be created
inputFile  String
Name of the PKCS-12 file, or a string containing its PEM textual representation.
password  String
Password or "" if not encrypted

Return Value

Int32
If successful, it returns the number of bytes written to the output file; otherwise it returns a negative error code

Remarks

Only supports weak 40-bit RC2 encryption for the certificate.

See Also

VB6/C equivalent: X509_GetCertFromPFX

[Contents] [Index]

[PREV: X509.GetCertFromPFX Method...]   [Contents]   [Index]   
   [NEXT: X509.HashIssuerAndSN Method...]

Copyright © 2004-26 D.I. Management Services Pty Ltd t/a CryptoSys. All rights reserved. Generated 2026-09-21T05:59:39Z.