OnExternalDigestSign
Security and signatures, events
Description
Handles the final digest-signing operation for every externally configured sign process on a TPDFlib instance
Syntax
Delphi
Property OnExternalDigestSign: TPDFlibExternalDigestSignEvent Read FOnExternalDigestSign Write FOnExternalDigestSign;
Type TPDFlibExternalDigestSignEvent = Function(Sender: TObject; SignProcessID: Integer; Const Digest: AnsiString; DigestAlgorithm, SignatureAlgorithm: Integer; Var Signature: AnsiString): Boolean Of Object;
Parameters
| Sender | The TPDFlib instance performing the operation |
|---|---|
| SignProcessID | The process whose signature is requested |
| Digest | Binary digest of the DER-encoded CMS authenticated-attributes set |
| DigestAlgorithm | Digest code selected by SetSignProcessDigestAlgorithm |
| SignatureAlgorithm | Raw signature format selected by SetSignProcessExternalDigestSigner |
| Signature | Set this output to the raw RSA signature, DER ECDSA signature, or P1363 ECDSA signature requested by SignatureAlgorithm |
Return value
Return True only after Signature contains a complete result
Remarks
The event runs synchronously during EndSignProcessTo* and is not called during placeholder sizing
Exceptions, a false result, an empty signature, an oversized signature, or a signature that does not verify against the configured certificate cause the sign process to fail
See also
SetSignProcessExternalDigestSigner, SetExternalDigestSignCallback