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]