Return number of certificates in a PKCS-7 "certs-only" certificate chain file.
Public Declare Function X509_GetCertCountInP7Chain Lib "diCrPKI.dll" (ByVal strP7cFile As String, ByVal nOptions As Long) As Long
nRet = X509_GetCertCountInP7Chain(strP7cFile, nOptions) As Long
long __stdcall X509_GetCertCountInP7Chain(const char *szP7cFile, long nOptions);
Number of X.509 certificates found or a negative error code.
X509.GetCertCountInP7Chain Method
static int dipki::X509::GetCertCountInP7Chain (const std::string &inputFile)
static X509.get_cert_count_from_p7(p7file)
This function will also work with CMS signed data objects, too.
nCerts = X509_GetCertCountInP7Chain("certs.p7c", 0)
will return the number of certificates found in the file certs.p7c
.
X509_GetCertFromP7Chain X509_ReadCertStringFromP7Chain CMS_QuerySigData