TPLSignatureSourceLocator
Security and signatures
Description
TPLSignatureSourceLocator tells PLAuditSignatureSource which signature dictionary to check inside the signed revision. The audit resolves ObjectNumber and Generation in both cross-reference maps, requires the same in-use entry with the same physical identity, and then walks Path to the dictionary.
The path must end on the signature dictionary itself. The audit then requires a direct four-element /ByteRange equal to the passed TPLSignatureByteRange and a direct hexadecimal /Contents string. An indirect reference anywhere on the path stops the audit as incomplete.
Syntax
Delphi
TPLSignatureSourceLocator = record
ObjectNumber, Generation: Integer;
Path: TPLPDFPath;
end;Fields
| ObjectNumber | Number of the indirect object that owns the path start; it must be in use in both revisions |
|---|---|
| Generation | Generation of that object, matched exactly in both revisions |
| Path | Steps from the owning object to the signature dictionary as a TPLPDFPath; each TPLPDFPathStep carries Kind, Key and Index, where psDictionaryKey uses Key and psArrayIndex uses Index |
Remarks
Populate Path with SetLength before filling the steps. The record carries a managed dynamic array, so assigning the record shares that array rather than copying its steps; a modification is visible through every copy.
For an uncompressed owner, the audit's CurrentAnchorOffset must be the object's physical offset in the current file. For a compressed type-2 owner pass -1 and the audit checks the object stream container identity instead.
Path length is capped by Limits.MaxDepth, and every step also costs one node from Limits.MaxNodes.
The locator describes where the dictionary is, not what it contains; the byte range and Contents values are supplied separately and must agree with the document.