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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15.6 <strong>DLI</strong> <strong>Implementation</strong> <strong>and</strong> <strong>Reference</strong> <strong>Guide</strong><br />

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

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

Concepts <strong>and</strong> Facilities: <strong>Guide</strong> to the DL Pager Composition System<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<br />

first 16 bytes of this buffer contain the MD5 checksum (in binary) for the PDF<br />

document to sign. The callback must generate a PKCS #7 certificate as described<br />

above, <strong>and</strong> fill the data buffer with the certificate, in binary. The callback function<br />

must return the length to read from the data buffer, in bytes.<br />

NOTE: maxLen bytes are set aside in the output PDF file for the PKCS #7<br />

certificate, <strong>and</strong> will be written to the PDF file regardless of the actual certificate<br />

length. Callers should pass length values which are close to the certificate length<br />

if possible.<br />

dlpdfsignaturesetdatacallback<br />

This call is optional for clients using PKCS #7 certificates. A callback function is<br />

supplied for the signature. The callback is called during the dlpdfdocwritepdf<br />

function with binary information from the PDF file. This information will be in<br />

sequential pieces, <strong>and</strong> may be used to generate the PDF document hash value. The<br />

information is supplied as binary values in the character buffer; the length to read is<br />

supplied as the second parameter. A length of 0 indicates that no further data is to be<br />

read, <strong>and</strong> the hash may be finalized.<br />

dlpdfpageplacesignature<br />

This call associates a digital signature to a page in the PDF file generated by <strong>DLI</strong>. The<br />

signature appearance must fit in the bounds supplied in imageBBox. This call is<br />

required for all digital signatures, even invisible signatures. For invisible digital<br />

signatures, the imageBBox is ignored <strong>and</strong> may be NULL.

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

Saved successfully!

Ooh no, something went wrong!