CryptoSys PKI Toolkit Manual

X509.GetCertFromPFX Method (String, String, String)

Extracts an X.509 certificate from a PKCS-12 PFX/.p12 file, saving the output directly as a new file.

Syntax

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

Parameters

outputFile
Name of output file to be created
inputFile
Name of the PKCS-12 file
password
Password or "" if not encrypted

Return Value

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]

[HOME]   [NEXT: X509.HashIssuerAndSN Method...]

Copyright © 2004-12 D.I. Management Services Pty Ltd. All rights reserved.