|
View:
New views
13 Messages
—
Rating Filter:
Alert me
|
|
|
PdfPKCS7 object without private keyHi,
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 the scratch ? ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ |
|
|
Re: PdfPKCS7 object without private keyYou'll have to use an external signature. See http://itextpdf.sourceforge.net/howtosign.html#signextitextsharp2 for an example.
Paulo > -----Original Message----- > From: Mikro Trekker [mailto:mtrekker@...] > Sent: Thursday, June 25, 2009 1:26 PM > To: itext-questions@... > 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 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 the scratch ? > > -------------------------------------------------------------- > ---------------- > _______________________________________________ > iText-questions mailing list > iText-questions@... > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ |
|
|
|
|
|
|
|
|
Re: PdfPKCS7 object without private keyCan you provide the 'broken' signed PDF ? Some problems are more obvious ther than in the code ... Greetings Andreas ----- Original Message ---- From: Mikro Trekker <mtrekker@...> To: iText-questions@... Sent: Friday, June 26, 2009 11:07:12 AM Subject: Re: [iText-questions] 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 wrong with the code ??? ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@... https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ |
|
|
|
|
|
|
|
|
|
|
|
Re: PdfPKCS7 object without private keyMikro,
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 PKCS #7 while keeping in mind RFC 3852 and follow-ups on CMS. You might want to re-evaluate your requirements before, though, as adobe.PKCS7.sha1 implies the use of a fairly unsafe algorithm (SHA1). The PDF Ref recommends: "The format for encoding signature values should be adbe.pkcs7.detached. This encoding allows the most options in terms of algorithm use." BTW, RSA/1024 and MD5 aren't good choices for algorithms anymore, either. If you want to sign without knowing what you are doing, you might want to simply do as Paulo says, without any further ado. Regards, Michael. |
|
|
|
|
|
Re: PdfPKCS7 object without private keyMikro,
The final parameter of the constructor, the boolean hasRSAdata, is documented in the method Javadoc as "<CODE>true</CODE> if the sub-filter is adbe.pkcs7.sha1". Isn't that your sub-filter of choice? Could that "false" be the problem? As I only have the iText Java sources here, not the C# source, I'm not completely sure if this comment is valid for your situation, though. Regards, Michael. |
|
|
|
|
|
Re: PdfPKCS7 object without private keyHi, i am having the same problem, did you solved it??,
Best Regards, JM Diaz
|
| Free embeddable forum powered by Nabble | Forum Help |