GetSignerCertificateByName

security and signatures

Requires the Enterprise edition — part of the Enterprise signature verification surface in TPDFlibSignatureVerifier (unit PDFlibEntSignVerify)

Description

Decodes the signer certificate of the named field's selected CMS signer directly from the /Contents blob and summarises its identity fields.

The signer is matched by issuer and serial number, or by subject key identifier when the signer references the certificate that way. Only the CMS is decoded; the signature itself is not verified, and the method works for any PKCS#7-carrying SubFilter, detached or not.

Syntax

Delphi

Function TPDFlibSignatureVerifier.GetSignerCertificateByName(Const FieldName: WideString; SignerIndex: Integer; Out Cert: TPDFlibSignatureCertificate): Boolean;

Parameters

FieldNameFully qualified name of the signature field
SignerIndexZero-based CMS signer index within the signature
CertReceives subject and issuer display names, uppercase hex serial number, and UTC validity window

Return values

TrueThe signer certificate was found in the CMS and the summary was filled
FalseThe document is not open, the name is empty, the signer index is negative, or the signer certificate cannot be located or decoded; the record is returned cleared

Remarks

NotBefore and NotAfter are UTC, and ValidNow compares them against the current local clock converted to UTC; treat it as a convenience flag rather than a trust decision.

The serial number is uppercase hexadecimal with the most significant byte first, matching certificate viewers.

See also

TPDFlibSignatureCertificate, TPDFlibSignatureVerifier, EnumSignatures