GetSignatureCertificateChainDER
Digital signatures
Description
Returns one certificate from the path a signature carries, DER encoded.
Syntax
Delphi
Function TPDFlib.GetSignatureCertificateChainDER(Const InputFile, Password, FieldName: WideString; SignerIndex, ChainIndex: Integer): AnsiString;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. |
| ChainIndex | Zero-based position in the path; 0 is the signer, higher indices are its issuers. |
Return values
| Certificate | The certificate at that position. |
|---|---|
| Empty string | The index is past the path, or the file or field could not be read. |
Remarks
This reads structure only and verifies nothing: it reports the certificate the signature names, not a certificate that has been checked to have produced a valid signature.
Each call reads the file, so a caller walking the whole path should read the length once with GetSignatureCertificateChainLength and keep the count.
The document is read with a shared handle, so this answers while a verifier or viewer already holds the file open.
See also
GetSignatureCertificateChainLength, GetSignatureSignerCertificateDER