SetSignProcessExternalDigestSigner
Bezpečnosť a podpisy
Opis
Pripojí certifikát X.509 v kódovaní DER a externý digest-signing formát k PDF podpisovému procesu
Knižnica skonštruuje odpojený CMS objekt a zaregistrovanému callbacku pošle len finálny digest jeho autentizovaných atribútov
Syntax
Delphi
Function TPDFlib.SetSignProcessExternalDigestSigner(SignProcessID: Integer; Const CertificateDER: AnsiString; SignatureAlgorithm, SignatureReserveBytes: Integer): Integer;
ActiveX
Function PDFlib::SetSignProcessExternalDigestSigner(SignProcessID As Long, CertificateDER As Variant, SignatureAlgorithm As Long, SignatureReserveBytes As Long) As Long
DLL
int DLSetSignProcessExternalDigestSigner(int InstanceID, int SignProcessID, const char* CertificateDER, int CertificateLength, int SignatureAlgorithm, int SignatureReserveBytes);
Parametre
| SignProcessID | Value returned by a NewSignProcessFrom* function |
|---|---|
| CertificateDER | Complete DER-encoded RSA or ECDSA X.509 certificate corresponding to the external private key |
| SignatureAlgorithm | 1 for RSA PKCS#1 v1.5, 2 for DER-encoded ECDSA, or 3 for ECDSA P1363 r || s |
| SignatureReserveBytes | Expected upper bound for the raw signature, or 0 to derive it from the certificate public key |
Návratové hodnoty
| 1 | The external identity configuration was attached |
|---|---|
| 0 | The process id, certificate, algorithm, or reserve size was invalid |
Poznámky
Assign OnExternalDigestSign, call DLSetExternalDigestSignCallback, or provide an ActiveX callback object with SetExternalDigestSignCallback before ending the sign processThe callback is not invoked while sizing the
/Contents
CertificateDER
adbe.pkcs7.sha1 placeholder and is invoked exactly once for the final signatureReturned signature bytes are verified against adbe.pkcs7.detached before the PDF is acceptedWhen the process still uses the legacy
Pozri tiež
OnExternalDigestSign, SetExternalDigestSignCallback, SetSignProcessContentsEstimate, SetSignProcessExternalDigestSignerFromFile