Re: Digitally Sign PDF with CAPICOM Certificate



Hi,

have a look also at http://www.aloaha.com/software-development/signature-code.php

Kind Regards
Stefan Engelbert

"João Maia" <jmaia@xxxxxxxxx> schrieb im Newsbeitrag news:1180609879.229022.107470@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all !

I have a problem regarding the signing of pdf files from another
application. I am a developer of a ASP.NET (1.1) document management
app and in our app the user can select a pdf document stored in the
document management app and sign it digitally. The way I'm doing this
is when the user selects the pdf and clicks sign, I display a popup so
that he can select the certificate that he wants to use to sign the
document with. The popup returns a CAPICOM Certificate object
(Interop.CAPICOM.Certificate) and I pass it on to the object that
deals with the signing of the pdf. So far so good.

Now comes the tricky bit. To sign the pdf file I am currently using a
free library called iTextSharp which is a port from java to c# of a
library that allows us to manipulate pdf docs. I found it by reading
this article:

http://www.codeproject.com/useritems/Esignature.asp

The thing with this library is that it uses a specific representation
for the certificate object (org.bouncycastle.x509Certificate) which is
not the same as the CAPICOM representation, so I had to do some magic
to translate one object to another. I have achieved this by exporting
the CAPICOM certificate to an intermediate .pfx (PKCS #12) file, and
then loading an iTextSharp certificate object from that file. It
worked perfectly.

But... there is an issue... Some certificates cannot be exported.
Depending on the Certificate Authority (CA) a certificate can be
created without allowing it to be exported, so for these certificates
my method does not work. And guess what, our customer has these kind
of certificates...

So what I'm asking is:

- Does anyone know of a way to use a CAPICOM certificate object with
iTextSharp without having to export the certificate ?
- If not, can anyone recommend me a component (it does not have to be
free, my company is willing to pay for it) that can be used from .NET
1.1 and that can sign a PDF file using a CAPICOM certificate without
having to export it ?

Any help on this will be greatly appreciated. Thanks in advance.

Cheers,

Joao Maia


.



Relevant Pages

  • Re: [SLE] How to convert scanned pictures to a pdf book
    ... Creating one pdf file from a directory of multiple .png scans. ... Using kooka and my Cannon scanner, I have been scanning some articles ...
    (SuSE)
  • Re: Action keys missing in pdf file
    ... Current practice is to convert to Adobe PDF and release the pdf file ... Corporate has now released a new template file, ... Conversion of the slideshow to a pdf file is actually a "click on the pdf ...
    (microsoft.public.powerpoint)
  • Configuring IE to Use Adobe Reader 6.0 or Acrobat as Helper Applica
    ... To configure Adobe Reader 6.0.1 Open Reader, ... UNCHECK the box for "DISPLAY PDF IN BROWSER". ... >IE to use the Acrobat product as a helper applications. ... >Downloading a PDF File to Your Hard Disk ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Configuring IE to Use Adobe Reader 6.0 or Acrobat as Helper Applica
    ... To configure Adobe Reader 6.0.1 Open Reader, ... UNCHECK the box for "DISPLAY PDF IN BROWSER". ... >IE to use the Acrobat product as a helper applications. ... >Downloading a PDF File to Your Hard Disk ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: PDFs not encoded as base64
    ... then make sure that change didn't affect Acrobat or any other program that uses pdf files. ... the 1st 520 odd bytes are plain ascii and then the binary data ... If you look at the PDF file in Notepad, ... That will force the Base64. ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)