How do I use digital certificates in the Software Developer Kits (SDKs)?
How do I use digital signatures in the PDF-XChange and PDF-Tools SDKs?
The information below is a general guide that details how to use the MS Windows “CryptoAPI” & Digital Certificates in conjunction with the Tracker Software tools. We advise that developers have some knowledge of cryptology in order to understand the processes involved. Microsoft’s MSDN site provides comprehensive information regarding cryptography. See here for further information.
The PDF-XChange library exposes the essential functionality in the following library functions:
PXCp_SignDocumentBufW, which uses a memory buffer that contains a certificate in the PKCS#7 format.
PXCp_SignDocumentUsingPFXW, which uses a PFX file that contains a certificate in the PKCS#7 format.
The easiest way to create and manage certificates is to use the MS utilities MakeCert.exe and CertMgr.exe. If Microsoft Visual Studio is installed on the local computer then these utilities should already be available. Alternatively, they can be downloaded at the following links:
The following command example creates a self-signed certificate in ‘my’ store. The name of the created certificate is CertificateName. The ‘pe’ parameter specifies that the private key associated with the certificate can be exported:
makecert.exe –r –pe –ss my –n cn=”CertificateName”
The examples below detail the manner in which exported certificates located in ‘my’ save to disk. If a /7 key presents then the resultant *.pfx file contains the certificate in PKCS#7 format:
Certmgr.exe /put /c /7 /s my c:\mycert.pfx
Certmgr.exe /put /c /s my c:\mycert.cer
The PXCp_SignDocumentUsingPFXW function can be used in conjunction with files such as these to sign the content of PDF pages.
Microsoft uses CAPICOM to create digital certificates. See here for further information.
Please note that Capicom.dll must be registered before it can be used (Regesvr32 capicom.dll). This SDK contains many examples for C++/VB/C#/ASP/HTML developers.
The full Windows Driver Kit is available here. Please note that the content of the links in this section is subject to change.
More Like This
- KB#268: Why do the PDF-XChange products display the "File Info" of some PDF files in strange characters, whereas Adobe and other programs display readable information?
- KB#50: Error when running application scheduled task
- KB#45: How do Iuse digital certificates in the Software Developer Kits (SDKs)?
- KB#428: How do Ipassword protect a pdf file so no-one else can make edits to it.
- KB#269: Who owns the PDF format?