Install SSL Certificate in Coldfusion

Before couple of days, we migrated from coldfusion 8 to coldfusion 9. One of our project was using web services to transmit some updates on another application. It seems something wrong since upgradation. The error which was repeatedly occured was ‘javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated‘. It occurs when you use self signed SSL certificate. To get rid of this you have to add the certificate to the list of known certs.

Please perform following steps to do so.

  • Then open a command prompt and go to coldfusion jre/bin directory.

[code:as3]

$ cd /opt/jrun/jre/bin

[/code]

  • You can install a new certificate by following command.

[code:as3]

./keytool -import -storepass changeit -noprompt -alias newcertificate -keystore ../lib/security/cacerts -trustcacerts -file newcertificate.cer

[/code]

  1. alias – You can give any name alias to this.
  2. storepass is the password for the security store.If you haven’t changed it it will be set to ‘changeit’.
  3. file – certificate file which you need to install.

Make sure you have read, write permission to that certificate file.

After sucessfully following above points you still get an error then please restart you coldfusion services. I hope this would help you.