Re: Digitally Sign PDF with CAPICOM Certificate
- From: "Stefan Engelbert" <stefan@xxxxxxxxxxxx>
- Date: Sat, 9 Jun 2007 00:43:12 +0200
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
.
- Prev by Date: CSP FuncVerifyImage issue on Vista + IE
- Next by Date: CAPICOM sign file directly using spc store and pkv private key file
- Previous by thread: CSP FuncVerifyImage issue on Vista + IE
- Next by thread: CAPICOM sign file directly using spc store and pkv private key file
- Index(es):
Relevant Pages
|