Re: [iText-questions] PdfPKCS7 object without private key

2009-09-11 Thread JuanM
Hi, i am having the same problem, did you solved it??, Best Regards, JM Diaz mtrekker wrote: > > It didn't help. I used filter PdfName.ADBE_PKCS7_SHA1 and set hasRsaData > to true. > > PdfPKCS7 pk7 = new PdfPKCS7(null, chain, null, "SHA1", true); > > pk7.SetExternalDigest(digest, rsadata,

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-29 Thread Mikro Trekker
It didn't help. I used filter PdfName.ADBE_PKCS7_SHA1 and set hasRsaData to true. PdfPKCS7 pk7 = new PdfPKCS7(null, chain, null, "SHA1", true); pk7.SetExternalDigest(digest, rsadata, "RSA"); reader's signature panel says that an error ocecured while attempting to validate this signature. --

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-29 Thread mkl
Mikro, Mikro Trekker wrote: > PdfPKCS7 pk7 = new PdfPKCS7(null, chain, null, "SHA1", false); The final parameter of the constructor, the boolean hasRSAdata, is documented in the method Javadoc as "true if the sub-filter is adbe.pkcs7.sha1". Isn't that your sub-filter of choice? Could that "false"

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-29 Thread Mikro Trekker
I followed Acrobat's document "Signing and the Byte Range" : 1) I hash PDF ByteStream data using SHA1 2) this hash is being encrypted using SmartCard internals (mechanism SHA1_RSA) "The hash value is encrypted with the signer’s private key using a supported RSA or DSA signature algorithm. A signat

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-29 Thread mkl
Mikro, Mikro Trekker wrote: > > If filter is adobe.PKCS7.sha1 and I would like to create hashed siganture > then how to achieve it ? > A good starting point would be studying the PDF Ref (ISO32000-1:2008) chapter 12.8.3.3 "PKCS#7 Signatures as used in ISO 32000" and additionally RFC 2315 on P

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-27 Thread Mikro Trekker
If filter is adobe.PKCS7.sha1 and I would like to create hashed siganture then how to achieve it ? If you take a look on my posted code and correct me if it is correct to call sap.SetExternalDigest twice ? And what about SetExternalDigest function paramers ? 1) Digest is signed hash, correct ? 2

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-26 Thread Andreas Kuehne
@lists.sourceforge.net Betreff: Re: [iText-questions] PdfPKCS7 object without private key Here you go: http://hot.ee/mtrekker/HelloWorld2.pdf -- ___ iText-questions mailing list iText

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-26 Thread Mikro Trekker
Here you go: http://hot.ee/mtrekker/HelloWorld2.pdf -- ___ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-26 Thread Andreas Kuehne
] PdfPKCS7 object without private key The example link you provided works fine as it uses Windows CSP driver. I need to use opensc-pkcs11 driver. All I need to know is how to create PdfPKCS7 object, right ? Can somebody take a look on my previous post and see what's wron

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-26 Thread Mikro Trekker
The example link you provided works fine as it uses Windows CSP driver. I need to use opensc-pkcs11 driver. All I need to know is how to create PdfPKCS7 object, right ? Can somebody take a look on my previous post and see what's wrong with the code ??? -

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-25 Thread Paulo Soares
: itext-questions@lists.sourceforge.net > Subject: [iText-questions] PdfPKCS7 object without private key > > Hi, > > Does iText/iTextSharp allow creating PdfPKCS7 object when > private key is > not accessible ? (singing operation is done on the SmartCard). All I > have is > 1) a h

Re: [iText-questions] PdfPKCS7 object without private key

2009-06-25 Thread Mikro Trekker
I created external digest using SetExternalDigest. But for some reason PDF says "An error occured while attempting to validate this signature". Here is what I do: 1) I calculate SHA1 hash from the PDF content (digest variable) 2) this hash is signed on the SmartCard and returned as rsadata variabl

[iText-questions] PdfPKCS7 object without private key

2009-06-25 Thread Mikro Trekker
Hi, Does iText/iTextSharp allow creating PdfPKCS7 object when private key is not accessible ? (singing operation is done on the SmartCard). All I have is 1) a hash generated from the PDF content 2) X509 certificate 3) encrypted hash value If not, then do I have to write all PKCS7 releted from th