X509GetCertFromPFX Method |
Extract an X.509 certificate from a PKCS-12 PFX/.p12 file,
saving the output directly as a new file.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static int GetCertFromPFX(
string outputFile,
string inputFile,
string password = ""
)
Public Shared Function GetCertFromPFX (
outputFile As String,
inputFile As String,
Optional 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 (Optional)
- Password or "" if not encrypted (default="")
Return Value
Int32If successful, it returns the number of bytes written to the output file;
otherwise it returns a negative
error code
RemarksOnly supports weak 40-bit RC2 encryption for the certificate.
See Also