ColdFusion to access secure web service
I am trying to acc开发者_开发问答ess a secure web service using cfhttp tag in CFML but I am getting the following error:
"Could not establish the trust relationship for the SSL/TSL secure channel."
Can anyone please help??
Is the SSL cert is self-signed you will need to download it and install it in CF's keystore:
- In IE go to a page where the cert is available.
- Click on the lock icon next to the URL location
- Select “View Certificates”
- Click the “Details” tab
- Click the “Copy to File” button
- In step 2 of the wizard select the “Base-64 encoded x.509 (.cer)” option.
- In step 3 find the location of your security folder. This should be in /ColdFusion8/runtime/jre/lib/security/ Save the cert with a name of your choosing
- Inside the JRE/bin you will find a application called keytool.exe which can import this cert. Execute the following command replacing “MyCert” with the name you gave the cert: a. keytool -import -trustcacerts -keystore cacerts -storepass changeit -noprompt - alias mycert -file mycert.cer
- You should receive a message that “Certificate was added to keystore”
For more information on the Java Keytool see: http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html
精彩评论