Hi all,
I've a problem and i think it's related with the external digest array size. I
have had this code working until today:
tSignatureAppearance.setExternalDigest(new byte[128], new byte[20], "RSA");
I've just tested this with a new certificate (from a new CA, which i think
generates bigger keys (4 Kb?)) and it doesn't work; the acrobat reader says the
signature is not valid.
I have read in previous posts that the size of the buffer depends on the
signature size and the hash. Is there a way i could make the array big enought
so i don't have this problem? I have to work with keys of both sizes (2Kb and 4
Kb) and would like to know:
a) If is there a way i can calculate the size necessary from the certificate.
b) If i can use a size (lets say 1Kb) for the array so it should work with
every certificate, independently of it's size (i don't know if you MUST use a
128 bytes lenght array when singing with a 2 Kb key, o if you CAN use a 128
bytes (or bigger, this must be the minimum) length array.
Regards.
Eneko González Benito.
Este mensaje esta comprobado por Microsoft ForeFront Server Security estando
libre de virus.
Analizado mediante motores de CA InoculateIT, CA Vet, Norman Data Defense,
Sophos y Kaspersky.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php