CryptoSys PKI Pro Manual

X509_GetCertCountInP7Chain

Return number of certificates in a PKCS-7 "certs-only" certificate chain file.

VBA/VB6 Syntax

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

C/C++ Syntax

long __stdcall X509_GetCertCountInP7Chain(const char *szP7cFile, long nOptions);

Parameters

szP7cFile
[in] filename of the PKCS-7 "certs-only" file, or a string containing its PEM textual representation.
nOptions
[in] option flags: not used in this release. Specify zero.

Returns (VBA/C)

Number of X.509 certificates found or a negative error code.

.NET Equivalent

X509.GetCertCountInP7Chain Method

C++ (STL) Equivalent

static int dipki::X509::GetCertCountInP7Chain (const std::string &inputFile)

Python Equivalent

static X509.get_cert_count_from_p7(p7file)

Remarks

This function will also work with CMS signed data objects, too.

Example

nCerts = X509_GetCertCountInP7Chain("certs.p7c", 0)

will return the number of certificates found in the file certs.p7c.

See Also

X509_GetCertFromP7Chain X509_ReadCertStringFromP7Chain CMS_QuerySigData

[Contents] [Index]

[PREV: X509_CheckCertInCRL...]   [Contents]   [Index]   
   [NEXT: X509_GetCertFromP7Chain...]

Copyright © 2004-24 D.I. Management Services Pty Ltd. All rights reserved. Generated 2024-09-23T07:52:09Z.