Click or drag to resize

X509ReadCertStringFromP7Chain Method

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

Namespace: CryptoSysPKI
Assembly: diCrSysPKINet (in diCrSysPKINet.dll) Version: 23.0.0.30549 (23.1.0.0)
Syntax
public static string ReadCertStringFromP7Chain(
	string inputFile,
	int index
)

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