It's necessary for the example. I've no idea if you need it, that depends on your code.
> -----Original Message----- > From: Vincent Saulnier [mailto:[EMAIL PROTECTED] > Sent: Thursday, November 17, 2005 5:14 PM > To: Paulo Soares > Subject: Re: [iText-questions] Sign PDF using MS CAPI > > Thank you! > > But why is this : > > KeyStore ks = KeyStore.getInstance("pkcs12"); > ks.load(new FileInputStream("my_private_key.pfx"), > "my_password".toCharArray()); > String alias = (String)ks.aliases().nextElement(); > PrivateKey key = (PrivateKey)ks.getKey(alias, > "my_password".toCharArray()); > Certificate[] chain = ks.getCertificateChain(alias); > > still necessary? > > I only want to use the certificate located in the MS CAPI. > > > On 11/17/05, Paulo Soares <[EMAIL PROTECTED]> wrote: > > Go to http://itextpdf.sourceforge.net/howtosign.html#signextstd and > > scroll to "An example with an external hash and signature in Windows > > Certificate Mode". Replace hash with your calculated hash and > > sign.sign() with your signature, all this in the line > > sig.setExternalDigest(sign.sign(), hash, "RSA"). > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] On > > > Behalf Of Vincent Saulnier > > > Sent: Thursday, November 17, 2005 4:47 PM > > > To: [email protected] > > > Subject: [iText-questions] Sign PDF using MS CAPI > > > > > > I have to sign a PDF using the MS CAPI when the private key > > > is not exportable. > > > > > > Is there an easy way to do that? > > > > > > Do I have to create a PdfDictionary like in this example : > > > How to sign with an external signature dictionary > > > (authenticatedAttributes example) > > > http://itextpdf.sourceforge.net/howtosign.html > > > > > > Best regards, > > > -- > > > Vincent Saulnier > > > Consultant, standards Web > > > > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by the JBoss Inc. Get > Certified Today > > Register for a JBoss Training Course. Free Certification Exam > > for All Training Attendees Through End of 2005. For more info visit: > > http://ads.osdn.com/?ad_idv28&alloc_id845&opclick > > _______________________________________________ > > iText-questions mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > -- > Vincent Saulnier > Consultant, standards Web > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_idv28&alloc_id845&op=click _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
