22.03.2015 Views

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

DLI Implementation and Reference Guide - Datalogics

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>DLI</strong> <strong>Reference</strong> <strong>Guide</strong> A.161<br />

dlpdfsignaturesetpkcs7cert (DLPDFSIGNATURE<br />

*signature, int maxLen, int (*genPKCS7Cert)(char *))<br />

Return Value: void<br />

Description<br />

Parameters<br />

Return Value<br />

This function sets the certificate generation callback<br />

for DLPDFSIGNATUREs of type<br />

dlpdfsigacropkcs7 <strong>and</strong> dlpdfsigverisign.<br />

• DLPDFSIGNATURE *signature: signature<br />

with which certificate will be associated<br />

• int maxlen: number of bytes provided to<br />

the genPKCS7Cert callback<br />

• int (*genPKCS7Cert)(char *): callback<br />

function, called during the<br />

dlpdfdocwritepdf function call; see<br />

Technical Notes below.<br />

void<br />

Exceptions<br />

Header<br />

Related Methods<br />

Availability<br />

dli.h<br />

dlpdfdocwritepdf<br />

dlpdfsignaturesetdatacallback<br />

dlpdfsignaturesetx509cert<br />

All <strong>DLI</strong>-supported platforms.<br />

Technical Notes<br />

1 For these signature types, dlpdfsigacropkcs7 <strong>and</strong> dlpdfsigverisign, the<br />

application using <strong>DLI</strong> is required to generated a fully-formed PKCS #7 certificate<br />

with an MD5 checksum of the PDF document, encrypted with the private key<br />

corresponding to the public key in the certificate. The RSA public-key algorithm<br />

with a 1024-bit key length is used.<br />

• The genPKCS7Cert callback is called by <strong>DLI</strong> during the dlpdfdocwritepdf<br />

function call. The callback is supplied a binary data buffer of length maxLen. The

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!