Hi all and thanks in advance for your answers.
Here is my problem :

I have a c++ ssl webserver and I want to connect to it using a java client.
I have manually (with keytool) imported my CA and everything works fine like that. But when my java client is installed, I'd like that no manual things are done to be able to connect succesfuly to my server.

So, is there a way to embed the CA in the java code ? I mean, I'm looknig for the equavalent of the following CC++ code in Java.

Here os the C++ code :

******* start of code*****************
X509 *cert =NULL;
   X509_STORE *store = NULL;
if (!(store = SSL_CTX_get_cert_store (ptrSocket->ctxSSLContext)))
   {
       printf ("Can't make X509 store");
   }
const unsigned char *cert_data = &szRootCa_certificate[0];

   cert = d2i_X509 (NULL, &cert_data, sizeof (szRootCa_certificate));
   X509_STORE_add_cert (store,cert);
   X509_free (cert);
******* end of code**************


Thanks for your answers
Severine
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to