Now that the LDAP server is ready, you will need to configure the ColdFusion server. Since SSL is a two-way trusted communication, the client, ColdFusion in this case, needs to trust and accept the server certificate. The trust can be established by directly knowing the LDAP server certificate or knowing the CA who cerified the server. In ColdFusion, LDAP SSL is implemented using the JSSE specification. The trust can be achieved by importing either the LDAP server certificate or the CA certificate into the Java trusted key store used by ColdFusion.
The default Java trusted key store is called "cacerts", which is located in the {java.home}/jre/lib/security/ directory (or /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/lib/security/ on Max OS X). You will use the Java keytool utility to manage the key store. You may find the keytool utility under either {java.home}/bin/ or {java.home}/jre/bin (keytool.exe for Windows; keytool for UNIX/Linux). Add the keytool path to your command path first for ease of use.
From DOS prompt on Windows:
set PATH=%PATH%;{java.home}/jre/bin
On UNIX/Linux:
export PATH=%PATH;{java.home}/jre/bin
Note: Replace values in braces { } with your own environment setting.
Enter the following command (type on one line) to import the certificate:
keytool -import -keystore cacerts -file {myldapservercert.cer or CAservercert.cer} -alias ldapserver-cert -storepass changeit
The password for the cacerts truststore is "changeit" by default. After import, you may confirm that you have imported the certificate properly by using the following command (type on one line):
keytool -list -keystore cacerts -alias ldapserver-cert -storepass changeit -v
This will list the content of your certificate.
The certificate must be in a Base64-encoded X.509 format. If you get an "Input not an X.509 certificate" error while importing, this may be due to a bug in the version of JDK/JRE and you try to download JDK 1.4.2_03 or later from Sun. Also remember to switch the JDK/JRE used by ColdFusion by editing the java.home property in the jvm.config file.
If you are using JRun as the underlying J2EE server (either the Server Configuration or the J2EE with JRun Configuration) and have enabled SSL for the internal JRun web server(JWS), you will need to import the certificate to the truststore defined in the jrun.xml file for the Secure JWS rather than the JRE key store. By default, the file is called "trustStore" and is typically located underjrun_root/lib for the J2EE with JRun configuration or cf_root/runtime/lib for the ColdFusion Server configuration. You will use the same Java keytool to manage the trustStore.