Importing Self-Signed certificates into ColdFusion
If you ever needed to connect to a site that was using a self-signed certificate using cfhttp, here is how you import their certificate as a trusted certificate. This of course is dangerous, but can be OK if you know that the server is one you are trying to integrate with.
- Export the certificate by browsing to the site https://mydomain.com and save it DER encoded
- cd to
/runtime/jre/lib/security/ - bin/keytool -keystore cacerts -import -alias mydomain -file mydomain.com.cer
- Password is “changeit”, unless you did, of course, change it
- Restart ColdFusion
Here is the documentation on the Java keytool.