Keystore to cacert in Java

Hi,

Please help me with this SSL problem. I am trying to run a small web service application over SSL. Tomcat is the web server.

I have created a self signed certificate using the command

"%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA"

which created a .keystore file for me. I have put that on Tomcat root and my problem is how to put this .keystore into

C:\j2sdk1.4.2_04\jre\lib\security\cacerts file. on the client.

I mean how can you import a .keystore file into a cacert file.

Without the client not having the certificate it gives a 'SSLHandShakeException'

Thanks for your time

Shiran

[668 byte] By [Shiranthaa] at [2007-10-2 9:50:46]
# 1
You can use the keytool program (it comes with java) to export a certificate from the keystore and then import it into the cacerts file.
uglytacoa at 2007-7-16 23:55:52 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 2

If you can run keytool on the client machine with the necessary privilege, than run keytool -import with -keystore argument set to the path to cacerts file,

e.g. keytool -import -keystore c:\jre5\lib\security\cacerts -storetype jks -file mySelfSignedCert.cer ,,,

ghstarka at 2007-7-16 23:55:52 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 3
Thanks guys. I got it working. Should have read the jsse documentation for all uses of the keytool utility.
Shiranthaa at 2007-7-16 23:55:52 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...