GetSignatureEmbeddedCertificateCount

Digital signatures

Description

Counts the certificates a signature carries in its CMS.

A certificate collection extending beyond its enclosing CMS container is rejected; padding after the outer CMS object remains accepted

Syntax

Delphi

Function TPDFlib.GetSignatureEmbeddedCertificateCount(Const InputFile, Password, FieldName: WideString): Integer;

Parameters

InputFileThe signed PDF.
PasswordThe password to open it, or an empty string.
FieldNameA signature field name as reported by the signature enumeration.

Return values

CountThe number of embedded certificates.
0The file or field could not be read, or the signature embeds no certificates.

Remarks

Index certificates from 0 to this value minus one with GetSignatureEmbeddedCertificateDER.

The document is read with a shared handle, so this answers while a verifier or viewer already holds the file open.

See also

GetSignatureEmbeddedCertificateDER, GetSignatureSignerCertificateDER