Okay, i solved the problem myself....

More or less :) 
I found an entry in a mailing list (itext or bouncycastle) where you have to 
Change the security provider.
Here's the code:

//adding new provider, cause java got an error with acrobat version 1.6
Security.addProvider(new BouncyCastleProvider());               
PdfPKCS7 pk = af.verifySignature(name,"BC");

Now it works!

Thanks!

-----Ursprüngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Michael Kail
Gesendet: Freitag, 3. März 2006 12:13
An: [email protected]
Betreff: AW: [iText-questions] get Signatures

Thanks a lot! But when I try to open a pdf file created with acrobat Version 7 
the function verifySignature fails with error :
sun.security.pkcs.ParsingException: toDerInputStream rejects tag type -96

I searched in the internet and found a lot people having the same problem, and 
the advise to use newer java version or bouncycastle.
I'm using jre1.5.0_06 and there's the same error.
So I want to know if there's any way to solve the problem with bouncycastle.
Anybody tried? Or is there a good tutorial or hint how to get it working with 
iText-paulo?

Regards Michael

-----Ursprüngliche Nachricht-----
Von: Paulo Soares [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 3. März 2006 10:00
An: Michael Kail; [email protected]
Betreff: Re: [iText-questions] get Signatures

You already know that. There's another method to get the blank signatures.

----- Original Message ----- 
From: "Michael Kail" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, March 03, 2006 8:48 AM
Subject: [iText-questions] get Signatures


Hi!
I have just one small question. Before I searched in the mailing list,
but I didn't find any answer to my problem.

Just to get sure, how to find any signature in a pdf file:

PdfReader reader = new PdfReader(pdf);
AcroFields af = reader.getAcroFields();
//get signature names
ArrayList signames = af.getSignatureNames();
if (signames.isEmpty()){
return;
}

In this Arraylist are all Signature names available. Are there any known
bugs or reasons why acrobat reader shows me a signature, but there's
none in the ArrayList?

Thanks for help again...

Michael


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to