ok,

I received a cer file from CaCert - how to use it with iText :)

that's it. Original code using keytool generated certificate works
fine. I can import the CER content into a keystore and inspect it, but
I can't use it to sign :(

I will keep trying and studying the web available material.. soon I
get any result I back to ask here.

Thank you very much by the friendly support.

On 8/1/07, Paulo Soares <[EMAIL PROTECTED]> wrote:
> A pkcs7 doesn't have a private key.
>
> Paulo
>
> ----- Original Message -----
> From: "Felipe Gaúcho" <[EMAIL PROTECTED]>
> To: "Post all your questions about iText here"
> <[email protected]>
> Sent: Wednesday, August 01, 2007 10:59 AM
> Subject: Re: [iText-questions] example using BouncyCastle
>
>
> > trying the below code I can inspect the signature, everything seems fine.
> >
> > File pkcs7File = new File("mycacert.p7b");
> > FileInputStream inputStream = new FileInputStream(pkcs7File);
> > byte[] bytes = new byte[inputStream.available()];
> > inputStream.read(bytes);
> > sun.security.pkcs.PKCS7.PKCS7 pk = new PKCS7(bytes);
> > java.security.cert.X509Certificate.X509Certificate[] chain =
> > pk.getCertificates();
> >
> > problem: in the method setCrypto of the signature appearance, I need
> >
> > java.security.PrivateKey
> > java.security.cert.Certificate[]
> >
> > how to convert:
> >
> > BouncyCastle
> >     Java API
> > sun.security.pkcs.PKCS7.PKCS7                         -->>
> > java.security.PrivateKey
> > java.security.cert.X509Certificate.X509Certificate[]   -->>
> > java.security.cert.Certificate[]
> >
> > or how to use bouncy with iText ?
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to