CryptoSys PKI Pro Manual

X509.ReadCertStringFromP7Chain Method

Read an X.509 certificate into a base64 string from PKCS-7 "certs-only" data.

Syntax

[C#]
public static string ReadCertStringFromP7Chain(
   string inputFile,
   int index 
)
[VB]
Public Shared Function ReadCertStringFromP7Chain (
   inputFile As String,
   index As Integer 
) As String

Parameters

inputFile  String
filename of a PKCS-7 "certs-only" file, or a string containing its PEM textual representation.
index  Int32
specifying which certificate (1,2,...) in the chain to extract.

Return Value

String
String in continuous base64 format, or an empty string on error.

Remarks

[New in v12.2] To find the number of certificates in the chain, use GetCertCountInP7Chain. The old (deprecated) way to find the count of certificates was to set index to zero.

See Also

VB6/C equivalent: X509_ReadCertStringFromP7Chain

[Contents] [Index]

[PREV: X509.QueryCert Method...]   [Contents]   [Index]   
   [NEXT: X509.ReadCertStringFromPFX Method...]

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