RE: How change/reinitialize the SSLContext in Axis2

Martin Gainty <[email protected]>
Newsgroups gmane.text.xml.axis.user
Message-ID <[email protected]>
easy to init SSLClient with certificate ...

 

     SSLClient client=new SSLClient();
     client = setup_certificate(client);

 

     String hostURL_for_socket = props.getProperty("ObrigadoURL");

     String securePortUrl=props.getProperty("securePort");

//now we can create the SSLSocket from the populated SSLClient
     SSLSocket secure_socket = (SSLSocket) client.createSocket(hostURL_for_socket,securePortURL );

 

//in setup_certificate method

//add certificate to KeyMaterial

//then add KeyMaterial to SSLClient..

 

setup_certificate(SSLClient client)

...

String keystoreFile=this.getServletContext().getRealPath("Obrigado.jks");

String keyStorePass = "Obrigado";

..

//establish new KeyMaterial with filename from cert and associated keyStorefile

KeyMaterial key_material=new KeyMaterial( new java.io.File(cert_filename), new java.io.File(keystoreFile), keystorePass.toCharArray()) ;

 

// Let's load a client certificate (max: 1 per SSLClient instance).

client.setKeyMaterial( key_material);

return client;

}

 

The limitation is one SSLclient per client cert

 

¡Saludos Cordiales desde EEUU!
Martín  
______________________________________________ 

Porfavor..no altere ni interrumpir esta communicacion...Gracias


  





From: [email protected]
To: [email protected]
CC: [email protected]; [email protected]; [email protected]
Subject: How change/reinitialize the SSLContext in Axis2
Date: Wed, 28 Aug 2013 13:37:53 -0300







Hi,
 
Until today, I had to reach a lot of Web Services, everyone with the same Key Certificate and Trust Certificate to do the SSL Handshake.
 
To achieve this I only set the JSSE System Properties (javax.net.ssl.keyStore, javax.net.ssl.keyStorePassword, javax.net.ssl.trustStore, etc…) during the application initialization and everything works fine.
 
Now I have to reach one Web Service more, but with a different Key Certificate.
 
How can I change/reinitialize the SSLContext through Axis2 to achieve this?
 
 

 
 
Regards,
 
Fernando Cesar
image001.jpg (image/jpeg, 105 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.