[iText-questions] [SPAM] Re: [SPAM] Error on PDF decryption

2013-07-04 Thread Valentin Ivanov
Hi Paulo, I think the exception is somewhere from bouncycastle libraries. I have attached the iText and BC sources to the project in Eclipse , but when debugging only iText sources are opened. I have no idea why , yet. So I can not determine the exact line of the exception. Regards, Valentin

[iText-questions] [SPAM] Re: [SPAM] Re: Error on PDF decryption

2013-06-27 Thread Valentin Ivanov
Hi, I send it again, this time I received the post on my mail, but still the stack trace is missing? And by the way I still have on my posts the yellow line that states "This post has NOT been accepted by the mailing list yet. " May be I missed something! -- View this message in context: http:

[iText-questions] [SPAM] Re: [SPAM] Error on PDF decryption

2013-06-27 Thread Valentin Ivanov
Paulo Soares-4 wrote > You'll have to provide more information, like a complete stack trace. Here it is: Best Regards, Valentin -- View this message in context: http://itext-general.2136553.n4.nabble.com/Error-on-PDF-decryption-tp4658603p4658627.html Sent from the iText - General mailing list

[iText-questions] [SPAM] Re: Error on PDF decryption

2013-06-27 Thread Valentin Ivanov
blowagie, I register to the mailing list again. So I guess now everything is fine, isn't it? -- View this message in context: http://itext-general.2136553.n4.nabble.com/Error-on-PDF-decryption-tp4658603p4658625.html Sent from the iText - General mailing list archive at Nabble.com.

[iText-questions] [SPAM] Error on PDF decryption

2013-06-26 Thread Valentin Ivanov
Hi, decryption/encryption using BC 1.46 an iText 5.2.1 is working fine. Encryption using BC 1.49 and iText 5.4.2 is working fine, but decrypting throws : The code where the exception is thrown is : The provider is SunPKCS11! Regards, Valentin -- View this message in context: http://itext-ge

[iText-questions] [SPAM] Re: Green check mark issue

2013-06-26 Thread Valentin Ivanov
Wow, I wasn't aware of that. Thank you Michael. Best Regards, Valentin -- View this message in context: http://itext-general.2136553.n4.nabble.com/Green-check-mark-issue-tp4658502p4658602.html Sent from the iText - General mailing list archive at Nabble.com. --

[iText-questions] [SPAM] Re: Green check mark issue

2013-06-25 Thread Valentin Ivanov
Michael, may I see your front page with the signature. Because I have this difference : GreenMarkDiff.png . Best Regards, Valentin -- View this message in context: http://itext-general.2136553.n4.nabble.com/Green-

[iText-questions] [SPAM] Re: Green check mark issue

2013-06-24 Thread Valentin Ivanov
Hi Michael, have you installed the certificates on your local machine to see if the green check mark appears correctly? Best Regards, Valentin -- View this message in context: http://itext-general.2136553.n4.nabble.com/Green-check-mark-issue-tp4658502p4658589.html Sent from the iText - General

[iText-questions] [SPAM] Re: Green check mark issue

2013-06-13 Thread Valentin Ivanov
Michael, Michael wrote > Neither of them actually includes an OCSP response. Yes you are right. I did not create the cert path, hence the BouncyCastle OCSPClient did not get involved. Here is new example file with OCSP signed_Technical_data_TS_OCSP.pdf

Re: [iText-questions] Green check mark issue

2013-06-11 Thread Valentin Ivanov
es, new java.security.cert.Certificate[]{certPriv.getCert()}, crlClient, ocspClient, tsClient, 0, MakeSignature.CryptoStandard.CMS); / Best Regards, Valentin Ivanov -- View this message in context: http://itext-general.2136553.n4.nabble.com/Green-check-mark-issue-tp4658502p4658514.html Sent fr

Re: [iText-questions] Green check mark issue

2013-06-11 Thread Valentin Ivanov
Michael, it is strange to me as I include only the signer certificate in both files. Should I always include the certificate chain? I mean Is this best practice? The certification path I include manually in the Trusted identities of Acrobat reader. Here is the pdf signed with old libraries signed

Re: [iText-questions] Green check mark issue

2013-06-10 Thread Valentin Ivanov
Yes I can provide sample pdf. It is signed_Technical_data.pdf Thank you -- View this message in context: http://itext-general.2136553.n4.nabble.com/Green-check-mark-issue-tp4658502p4658504.html Sent from th

[iText-questions] Green chack mark issue

2013-06-10 Thread Valentin Ivanov
Hi all, when sign PDF using iText5.2.1 and BC1.46 the green check ( V ) mark appears fine. Now i update lb to iText5.4.2 and BC1.48 and have no green check mark, even that : - Document certification is valid - Time stamp, OCSP and CRL are included - I have included signers certification path

Re: [iText-questions] ClassCastException when using iText5.2.1

2012-06-25 Thread Valentin Ivanov
Thank you both, you are so fast, I have download the java file and tried it. It now works fine! Best Regards -- View this message in context: http://itext-general.2136553.n4.nabble.com/ClassCastException-when-using-iText5-2-1-tp4655413p4655433.html Sent from the iText - General mailing list arch

Re: [iText-questions] ClassCastException when using iText5.2.1

2012-06-25 Thread Valentin Ivanov
Hi, you both are right. If I remove /Trapped, I have no exception, but on *some* files even if /Trapped is still there if I retype /Producer I have no exception as well. -- View this message in context: http://itext-general.2136553.n4.nabble.com/ClassCastException-when-using-iText5-2-1-tp4655413

Re: [iText-questions] ClassCastException when using iText5.2.1

2012-06-25 Thread Valentin Ivanov
I figured out which item exactly cause the exception and this is Producer. Right now it hase value "TCPDF 5.9.162 (http://www.tcpdf.org)" , but according to this http://sourceforge.net/projects/tcpdf/forums/forum/435311/topic/4392795 HERE we should not change it because of license agreement. So w

Re: [iText-questions] ClassCastException when using iText5.2.1

2012-06-25 Thread Valentin Ivanov
I would like to say that the PDF file is created using http://www.tcpdf.org and PHP. So the creation of the document is as : / // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); // set document information $pdf->SetCreator(PDF_CREAT

Re: [iText-questions] ClassCastException when using iText5.2.1

2012-06-24 Thread Valentin Ivanov
Hi, I am uploading the file in question. http://itext-general.2136553.n4.nabble.com/file/n4655422/Form5a.pdf Form5a.pdf Thank you Best Regards -- View this message in context: http://itext-general.2136553.n4.nabble.com/ClassCastException-when-using-iText5-2-1-tp4655413p4655422.html Sent from th

Re: [iText-questions] ClassCastException when using iText5.2.1

2012-06-24 Thread Valentin Ivanov
Hi Alexis, I am using iText5.2.1 because I also use BC1.46. I will upgrade to BC1.47 ANd iText5.3.x but right now i have to use BC1.46. Thank you -- View this message in context: http://itext-general.2136553.n4.nabble.com/ClassCastException-when-using-iText5-2-1-tp4655413p4655421.html Sent from t

[iText-questions] ClassCastException when using iText5.2.1

2012-06-22 Thread Valentin Ivanov
Hi, when I use iText5.1.2 i have no problems, but when I use iText5.2.1 I have the following exception: / java.lang.ClassCastException: com.itextpdf.text.pdf.PdfName cannot be cast to com.itextpdf.text.pdf.PdfString at com.itextpdf.text.xml.xmp.XmpWriter.(XmpWriter.java:210) at com

[iText-questions] itext-paulo-155 and Java 7

2012-05-17 Thread Valentin Ivanov
Hello, I use *itext-paulo-155_fixed.jar* to sign PDF files in Java 6 without any problems. But in Java 7 I have the exception : /java.lang.ClassCastException: com.lowagie.text.pdf.PdfTemplate cannot be cast to java.lang.Comparable at java.util.TreeMap.compare(Unknown Source) at

Re: [iText-questions] PDF decrypting with iText-5.2.1 revision 5117

2012-04-12 Thread Valentin Ivanov
yes, but then should not the exception show the missing BC "thing" in the stack trace? As Paulo says BC1.47 is recent version and need testing. -- View this message in context: http://itext-general.2136553.n4.nabble.com/PDF-decrypting-with-iText-5-2-1-revision-5117-tp4548957p4551161.html Sent fro

Re: [iText-questions] PDF decrypting with iText-5.2.1 revision 5117

2012-04-11 Thread Valentin Ivanov
PDF decrypting works fine with BC1.46 and iText-5.2.1 (official release). It seems like the problem is not in iText. -- View this message in context: http://itext-general.2136553.n4.nabble.com/PDF-decrypting-with-iText-5-2-1-revision-5117-tp4548957p4551019.html Sent from the iText - General maili

[iText-questions] PDF decrypting with iText-5.2.1 revision 5117

2012-04-11 Thread Valentin Ivanov
I have encrypted PDF file. with BC1.46 and iText-5.1.3 I decrypt the file successfully. With BC1.47 and iText-5.2.1 HEAD revision i have exception : /com.itextpdf.text.exceptions.InvalidPdfException: Bad certificate and key. at com.itextpdf.text.pdf.PdfReader.readPdf(PdfReader.java:515) at com.it

Re: [iText-questions] iText 5.2.1 and Bouncycastle 1.47

2012-04-11 Thread Valentin Ivanov
Hello Paulo, at first glance i did not find the svn repository. But now i download iText revision 5117, is this the right lib you are talking about? -- View this message in context: http://itext-general.2136553.n4.nabble.com/iText-5-2-1-and-Bouncycastle-1-47-tp4544704p4548819.html Sent from the

Re: [iText-questions] iText 5.2.1 and Bouncycastle 1.47

2012-04-11 Thread Valentin Ivanov
I have the same issue during PDF encription. In addition http://www.bouncycastle.org/wiki/display/JA1/Porting+from+earlier+BC+releases+to+1.47+and+later HERE is the table of changes in BC1.47. -- View this message in context: http://itext-general.2136553.n4.nabble.com/iText-5-2-1-and-Bouncycas

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-03 Thread Valentin Ivanov
I have set the Private Key to null in sap.setCrypto(), and all is OK now. Thank you -- View this message in context: http://itext-general.2136553.n4.nabble.com/SunPKC11-Exception-when-signing-PDF-tp4340293p4354641.html Sent from the iText - General mailing list archive at Nabble.com. ---

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-03 Thread Valentin Ivanov
Hi Mikel, I am close to solve the problem, I got ti to work this way: sap.setExternalDigest(null, new byte[20], null); > sig.setExternalDigest(null, hash, null); But this is "An example with an external hash in Windows Certificate Mode" I want to do it "An example with an external hash and si

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-02 Thread Valentin Ivanov
Hi Mikel, thank you for your attention, and I hope the problem will be resolved soon! Could you please take a look at the link i have provided, I am sure you took a look at the wrong sample. They are very close, actually one above another, and i guess you took a look at the one titled "An example

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-02 Thread Valentin Ivanov
Hi mkl, In the light of this I wonder why in your case both the org.btrust.signer.PDFSigner (in initSignPDF() called by signPDF()) and com.lowagie.text.pdf.PdfPKCS7 (in the constructor called by PdfSigGenericPKCS.setSignInfo() which in turn is called by PdfSignatureAppearance.preClose) initialize

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-01 Thread Valentin Ivanov
I forgot to say something which by the way is very strange for me. I sign PDF, PKCS7, XADES, OPEN XADES with one Provider. ONLY with PDF signing i get exception. That is the reason I thought iText might be involved in this. Have no explanation why whith the others signings i have no problems --

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-01 Thread Valentin Ivanov
I understand, but how can I clear the memory? sun.security.Provider have one method clear(), and sun.security.pkcs11.SunPKCS11 has no method for releasing the resources. I can not close the session explicitly! I am doing the sign in a method so when the method is done all variables are destroyed.

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-01 Thread Valentin Ivanov
And by the way the exception now is from line *PdfSignatureAppearance.preClose()* /ExceptionConverter: java.security.InvalidKeyException: Private keys must be instance of RSAPrivate(Crt)Key or have PKCS#8 encoding at sun.security.rsa.RSAKeyFactory.translatePrivateKey(Unknown Source)

Re: [iText-questions] SunPKC11 Exception when signing PDF

2012-02-01 Thread Valentin Ivanov
Hi Andreas, i know it looks strange, but I have write to my Provider and they told me nothing is wrong. And there is something i would like to tell you : if this line *sap.setExternalDigest(new byte[128], new byte[20], "RSA");* exist in the code i can sign exactly 50 files, but if the line do not

[iText-questions] SunPKC11 Exception when signing PDF

2012-01-29 Thread Valentin Ivanov
f I create new Provider every 90 files i get the first exception i posted. The strange is that i get the exception at different file every time, but after file 100.  Seems like some classes are playing with the provider sessions!!!   M. Cp. Eng. Valen