GetSignatureSignerCertificateDER

Digital signatures

Description

Returns the certificate that produced a signature, DER encoded.

Syntax

Delphi

Function TPDFlib.GetSignatureSignerCertificateDER(Const InputFile, Password, FieldName: WideString; SignerIndex: Integer): AnsiString;

Parameters

InputFileThe signed PDF.
PasswordThe password to open it, or an empty string.
FieldNameA signature field name as reported by the signature enumeration.
SignerIndexZero-based signer, for the rare signature that carries more than one.

Return values

CertificateThe signer certificate bytes.
Empty stringThe signer or its certificate is absent, or the file or field could not be read.

Remarks

The signer is matched out of the embedded set whether the signature identifies it by issuer and serial number or by subject key identifier.

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.

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

See also

GetSignatureCertificateChainLength, GetCertificateOCSPURLs