Results 1 to 2 of 2
- 05-26-2011, 12:33 PM #1
Member
- Join Date
- May 2011
- Posts
- 3
- Rep Power
- 0
Using multiple SSL certificates from the same host (axis 1.4 - axis2) how?
Hello,
From my web application (JSF or Servlet). I need to connect to different webservices using https and certificates from the same host.
I have imported multiple certificates in my keystore but I don't know how use them with axis or axis2?
I have tryed with "System.setProperty"...
but it's working only with first request.. If i like to call a second webservice which need other certificate I get error like this one:
javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
Has someone some example on how to use a keystore and truststore with axis, axis2?
I have tryed many examples from the web but with no success..
My code work only if I setup this properties
Java Code:System.setProperty("javax.net.ssl.keyStore","c:/cert/mycert.p12"); System.setProperty("javax.net.ssl.keyStorePassword", "119234646"); System.setProperty("javax.net.ssl.keyStoreType", "PKCS12"); System.setProperty("javax.net.ssl.trustStore", "c:/cert/myjks.jks"); System.setProperty("javax.net.ssl.trustStorePassword", "54k7lp0p"); System.setProperty("javax.net.ssl.trustStoreType","JKS");
- 05-28-2011, 09:12 AM #2
Member
- Join Date
- May 2011
- Posts
- 3
- Rep Power
- 0
what about multi thread an keystores?
I used Axis 1.4 and axis-ssl library...
Then I have made 2 jsp pages...
First page get first keystore and certificate
Second page get second keystore and certificate
If i try to call the first web page (a.jsp) then the page b.jsp wan't work..
In the second scenario after restart of my oc4j if I try to start page b.jsp then page a.jsp wan't work..
Here is some pice of my code...
Example for page a.jsp
here is sample of page b.jspJava Code:SSLClientAxisEngineConfig axisConfig = new SSLClientAxisEngineConfig(); axisConfig.setProtocol("TLS"); axisConfig.setAlgorithm("SunX509"); axisConfig.setKeyStore("c:/cert/test.p12"); axisConfig.setKeyStoreType("PKCS12"); axisConfig.setKeyStorePassword("119234646"); axisConfig.setTrustStore("c:/cert/peter.jks"); axisConfig.setTrustStorePassword("54k7lp0p"); axisConfig.setTrustStoreType("JKS"); try { MegaposProcessorServiceLocator loc = new MegaposProcessorServiceLocator(axisConfig); MegaposProcessor ws = loc.getprocessor(); ... ...
Is there a way to run in paralell mode page a and page b each with different certificate?Java Code:SSLClientAxisEngineConfig axisConfig = new SSLClientAxisEngineConfig(); axisConfig.setProtocol("TLS"); axisConfig.setAlgorithm("SunX509"); axisConfig.setKeyStore("c:/cert/asarh.pfx"); axisConfig.setKeyStoreType("PKCS12"); axisConfig.setKeyStorePassword("54k7lp0p"); axisConfig.setTrustStore("c:/cert/peter.jks"); axisConfig.setTrustStorePassword("54k7lp0p"); axisConfig.setTrustStoreType("JKS"); try { LegacyNETServiceLocator loc = new LegacyNETServiceLocator(axisConfig); LegacyNETServiceSoap ws = loc.getLegacyNETServiceSoap12(); out.print("<li>"+ ws.about()); } catch (Exception ex) { out.println("<li><b>napaka: " + ex.toString()); }
thank you for any help..
Similar Threads
-
Three certificates and one keystore
By peterv6i in forum Advanced JavaReplies: 0Last Post: 05-05-2011, 02:35 PM -
multiple response parameters in apache axis are not all not returned
By rude056 in forum Web FrameworksReplies: 4Last Post: 10-01-2010, 10:52 AM -
How to create file into another host from a host
By varadha in forum NetworkingReplies: 3Last Post: 02-10-2010, 09:03 PM -
copy file from local host to remote host
By isotoper in forum New To JavaReplies: 4Last Post: 12-24-2009, 04:41 PM -
Unable to connect to MySQL on another (unix) host from Eclipse on my windows host
By kairamr in forum EclipseReplies: 0Last Post: 10-31-2008, 07:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks