There are two steps involved in adding (i.e importing) SSL certificates to Webserver. I assume you are dealing with Java (any version) JVM. It doesn’t matter whether you are using Websphere, Weblogic, or any other J2EE application server, as long as you know the path to the Java home folder.
You can find out Java Home folder by this simple statement: System.getProperty(”java.home”).
Step1: Exporting SSL Certificate from IE6.0

- IE6: Open the target website e.g. https://www.verisign.com
- Go to your Internet Explorer option menu “Tools / Options / Content”. Click button.
- Find certificate with Target Website name.
- Click button.
- Select the format as “DER encoded binary x.509 (.CER)”. Save on some location, say c:\
Step2: Use keytool from /bin directory to add the certifcate to TrustStore.
Java SDK comes with lot of tools under its /bin folder. Note: you need Java SDK & not just JVM installed. The ‘keytool’ program in /bin folder is used to import a SSL certificate to Java’s TrustStore.
For Windows,
keytool -keystore cacerts -storepass changeit -import -alias -file
.cer -trustcacertsFor Unix/ Linux
bash-2.05# ./keytool -import -file /tmp/.cer -keystore /jre/lib/security/cacerts -alias -trustcacerts
How does it work?
When URL connection class connects to a secure website (usually with https:// prefix), the Webserver would send SSL certificate to prove that it is indeed the one which you tried to connect. Now URL connection is hardwired (actually its another class called TrustManager) with logic to validate the SSL Certificate against the default factory TrustStore. The TrustStore usually lies in “jre/lib/security/cacerts” file. If the website’s SSL certificate is not valid, then URL connection class would throw a SSL Handshake Exception. So it’s important to add target website’s SSL certificate to the TrustStore.