Tuesday, April 13, 2010

Adding Security Certificate to JVM to handle SecurityCertificateError

Handling SecurityCertificateError exception in JAVA by adding security certificate using Keytools

To add the security certificate for https URL the following steps needs to be followed

  • Take a backup of cacerts file in the following directory (This can be your default JRE directory also) C:\Program Files\IBM\SDP70\runtimes\base_v6\java\jre\lib\security\
  • Save the security certificate in some location for ex c:\certificate.cer
  • Go to Run type cmd
  • Execute CD C:\Program Files\IBM\SDP70\runtimes\base_v6\java\jre\bin (This is the location of the JRE WebSphere uses, in other environments please navigate to the JRE BIN the application uses)
  • Then execute the following command
(SYNTAX Keytool –keystore – import – file -alias<> )

Command
keytool -keystore "C:\Program Files\IBM\SDP70\runtimes\base_v6\java\jre \lib\security\cacerts" -import -file c:\certificate.cer -alias https://your-url.net

  • It will ask for a password , enter changeit
  • The security certificate will be added for the JRE

Now you can access the URL or access the webservice in the URL.

2 comments:

Anonymous said...

muwmuxfpykpviqxatzlpx. acne treatment
hqzfuw

Creogen Bot said...

We provide state of the art technology in Robotics and Artificial Intelligence to
meet business and domestic purposes. Our recent development of SRISHTI, an Autonomous
Cleaning and Surveillance Robot
for the purpose of cleaning and surveillance has been a breakthrough in the automation industry. To know more about the success and implementation, please visit us from the given links.