aspose file tools*
The moose likes Security and the fly likes Problem setting up JAX-WS & SSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Problem setting up JAX-WS & SSL" Watch "Problem setting up JAX-WS & SSL" New topic
Author

Problem setting up JAX-WS & SSL

Chary Anj
Greenhorn

Joined: Mar 04, 2010
Posts: 3
I am trying to setup mutual authentication between standalone java class & websphere apps server (6.1).
I have been setting ssl successfully by setting system properties to set the keystore, truststore, & their respective passwords values.
e.g.
System.setProperty("javax.net.ssl.trustStore","clientTrustStore.key");
... for all 4 params
This absolutely worked alright till I was using self signed certificate.
As soon as I installed the CA signed certificates. The same client code now throwing error for "bad_certificate" error.
The debug trace shows client code is not sending any certificate on server request. There is only one client & server trust certificate in the clients store. & simillarly at the server end.

After changing the code to use httpsConnection method, I configure key & trust store managers. Here if I assign the value for certificate alias in the keymanager. The code works absolutely fine. The problem is because of the way client code is implemented I wont be able to use httpsConnection package. In order to make this work first. Can somebody please throw some light,
1. How to specifiy the "specific certificate alias" value using System.setProperty in "javax.net.ssl". I didnt find anything there.
2. Why its failing for signed certificate so as I have t add the alias now (not sure if I changed something in the websphere side accidentally).

Thanks in advance
Chary
Chary Anj
Greenhorn

Joined: Mar 04, 2010
Posts: 3
Any takers for this issue ..

In summary .. How can I specify certificate alias (to point to specific certificate in the keystore) using the system property. Something simillar the way we specify the keystore as below

System.setProperty("javax.net.ssl.keyStore", keyStore);

Thanks
Chary
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem setting up JAX-WS & SSL
 
Similar Threads
JaxWs https and certificates
Problem setting up Security using JAX-WS for Signed certificates
SSL issues with cacerts (-trustcacerts option)
Configuring trust store for SSL client