Using itextshart with Portuguese Citizen Card

View: New views
3 Messages — Rating Filter:   Alert me  

Using itextshart with Portuguese Citizen Card

by Mário Santos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've trying to sign a Pdf with the Portuguese Citizen Card, using iTextSharp (trabalho fantástico Paulo!) but after signing, Acrobat Reader cannot validate the hash. The hash algorithm appears as unknown and the Certificate button is disabled.

I'm using PdfName.ADOBE_PPKLITE, PdfName.ADBE_X509_RSA_SHA1 for filter and subfilter and I'm setting the Cert property of the PdfSignature to the certificate of the signer.

The signing itself is performed by the Citizen Card smart card through the Crypto API using SHA1 for the hash algorithm and RSA for encrypting the hash.

Has anyone done something like this successfully?

thanks a lot!

Re: Using itextshart with Portuguese Citizen Card

by Mário Santos :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've solved my problem! I was getting the signing certificate without any information about the private key so I couldn't get the example provided by Paulo working.

Mário Santos wrote:
I've trying to sign a Pdf with the Portuguese Citizen Card, using iTextSharp (trabalho fantástico Paulo!) but after signing, Acrobat Reader cannot validate the hash. The hash algorithm appears as unknown and the Certificate button is disabled.

I'm using PdfName.ADOBE_PPKLITE, PdfName.ADBE_X509_RSA_SHA1 for filter and subfilter and I'm setting the Cert property of the PdfSignature to the certificate of the signer.

The signing itself is performed by the Citizen Card smart card through the Crypto API using SHA1 for the hash algorithm and RSA for encrypting the hash.

Has anyone done something like this successfully?

thanks a lot!

Re: Using itextshart with Portuguese Citizen Card

by migueldias :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Can someone please tell how to get information about the private key ? I can't get it well and i have the same problem...


I've solved my problem! I was getting the signing certificate without any information about the private key so I couldn't get the example provided by Paulo working.

Mário Santos wrote:
I've trying to sign a Pdf with the Portuguese Citizen Card, using iTextSharp (trabalho fantástico Paulo!) but after signing, Acrobat Reader cannot validate the hash. The hash algorithm appears as unknown and the Certificate button is disabled.

I'm using PdfName.ADOBE_PPKLITE, PdfName.ADBE_X509_RSA_SHA1 for filter and subfilter and I'm setting the Cert property of the PdfSignature to the certificate of the signer.

The signing itself is performed by the Citizen Card smart card through the Crypto API using SHA1 for the hash algorithm and RSA for encrypting the hash.

Has anyone done something like this successfully?

thanks a lot!