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!