Hi,
Thanks for rapid answer. This document is great but I am not using axis2 but jax-ws ri.
These are the steps I followed:
* Create self-signed certificate keystore/truststore for client and server.
cd $JAXWS_HOME/samples/fromwsdl_secure/etc/certs
--Generate a self-signed cert for tomcat server
keytool.exe -genkey -alias self -keyalg RSA -storepass server -keypass server -dname "cn=localhost" -keystore tomcat.keystore
Note: The use of localhost indicates that client and server are running on the same machine. If the server is on a remote machine
the server fully qualified domain name will be used.
--Now for the client export self-signed key from the server tomcat.keystore to give to the client
as a certificate to import.
keytool.exe -export -rfc -alias self -file tomcat.certificate -keystore tomcat.keystore -storepass server -keypass server
--On the client, import the tomcat.certificate into a client created keystore.
keytool.exe -import -noprompt -trustcacerts -alias self -file tomcat.certificate -keystore client.keystore -storepass client
Note: -keystore option creates the client.keystore file.
So now I have 3 files client.keystore, tomcat.certificate, tomcat.keystore.
The last is being picked up by the service itself. But my problem is that the client (by the way I am using C# for the client) gives me:
"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
What do I do?
Thanks.