GetSignatureCertificateChainLength
Digital signatures
Description
Returns the length of the certification path a signature carries for one signer.
Syntax
Delphi
Function TPDFlib.GetSignatureCertificateChainLength(Const InputFile, Password, FieldName: WideString; SignerIndex: Integer): Integer;Parameters
| InputFile | The signed PDF. |
|---|---|
| Password | The password to open it, or an empty string. |
| FieldName | A signature field name as reported by the signature enumeration. |
| SignerIndex | Zero-based signer. |
Return values
| Length | The number of certificates in the path, signer first. |
|---|---|
| 0 | The signer or its certificate could not be read. |
Remarks
Only certificates the signature itself embeds are used to build the path, so a path that stops short of a self-issued certificate means the remaining issuers have to be fetched through the addresses GetCertificateIssuerURLs reports. The path is not padded to look complete.
The document is read with a shared handle, so this answers while a verifier or viewer already holds the file open.