Import SSL certificates into Sun JDK

May 23, 2011 by Jean

List trusted authorities in Java runtime:

C:\ColdFusion8\runtime\jre\bin>keytool -list -storepass changeit -noprompt
-keystore C:\ColdFusion8\runtime\jre\lib\security\cacerts

Import new certificate:

  • Save certificate using web browser (DER encoded) as eg mycert.cer.
  • Place certificate in runtime/jre/lib/security/
  • Command line:
C:\ColdFusion8\runtime\jre\lib\security>..\..\bin\keytool -import -trustcacerts
-keystore cacerts -storepass changeit -noprompt
-alias mycert -file mycert.cer

Notes taken from Talking Tree. Thanks!

Requires ColdFusion service restart.