X509ReadCertStringFromP7Chain Method |
Read an X.509 certificate into a base64 string from PKCS-7 "certs-only" data.
Namespace: CryptoSysPKIAssembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntaxpublic static string ReadCertStringFromP7Chain(
string inputFile,
int index
)
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
StringString 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