TPDFlibSignatureTrustSource
security and signatures
Description
TPDFlibSignatureTrustSource is the base class for an external trust policy used by TPDFlibSignatureVerifier. It supplies the anchors trusted at a given time and classifies a chain that the verifier has already validated.
TPDFlibEUTSLTrustSource implements the contract from signed EU LOTL and national trusted lists; an application can derive its own source for a private or sector trust list.
Syntax
Delphi
TPDFlibSignatureTrustSource = Class
Public
Function GetRevision: Int64; Virtual; Abstract;
Function GetTrustAnchors(VerificationTime: TDateTime;
Out Certificates: TStructStrArray): Boolean; Virtual; Abstract;
Function EvaluateCertificateChain(Const Certificates: TStructStrArray;
VerificationTime: TDateTime;
Out Report: TPDFlibSignatureQualificationReport): Boolean;
Virtual; Abstract;
End;Fields
| GetRevision | Returns a revision number for the source content; the verifier caches its chain engine by revision and verification time and rebuilds when either changes |
|---|---|
| GetTrustAnchors | Supplies the DER-encoded certificates trusted as roots at VerificationTime; return False when the source cannot supply an anchor set for that time |
| EvaluateCertificateChain | Classifies a validated chain, leaf first, at VerificationTime into Report; return False when the source cannot classify it |
Remarks
The verifier stores a non-owning reference; keep the source alive until SetTrustSource(nil) or until the verifier is destroyed.
Source anchors are combined with manually added anchors in one exclusive chain engine; when neither supplies an anchor, validation fails closed instead of falling back to the system roots.
GetRevision and GetTrustAnchors run for every chain build; a source that changes its anchor set must change the revision, or the cached engine will be reused for the same verification time.
EvaluateCertificateChain never strengthens the verdict: validity, usage, signature and revocation checks have already run, and returning False degrades the qualification status to sqsNotApplicable.
See also
TPDFlibSignatureVerifier, TPDFlibEUTSLTrustSource, AddTrustAnchorDER, ClearTrustAnchors, VerifySignerCertificateChainEx