Solved

Unable to post to Secure URL using CFHTTP (Urgent)

Posted on 2006-10-19
5
656 Views
Last Modified: 2013-12-20

 I have the following cfhttp call that PUTs an XML file to a secure URL.  

 It  works fine on an unsecure URL, but when we switch to test with a secure URL, it fails.

 This works...
<cfset variables.URL = "http://www.mydomain.com/services">

<cfhttp method = "PUT" url = "#variables.URL#" throwOnError = "No">
     <cfhttpparam type="xml" value="#variables.xmlContent#">
</cfhttp>

 Using this URL instead it fails  (note the https)
<cfset variables.URL = "https://www.mydomain.com/services">

 We are getting a "connection failure" error.

 The secure URL has been tested using another mechansim (other than coldfusion) and it is working.

 Thanks for your help!!

0
Comment
Question by:gdemaria
  • 3
  • 2
5 Comments
 
LVL 36

Accepted Solution

by:
SidFishes earned 500 total points
ID: 17766057
this help?

To use HTTPS with the cfhttp tag, you might need to manually import the certificate for each web server into the keystore for the JRE that ColdFusion uses. This procedure should not be necessary if the certificate is signed (issued) by an authority that the JSSE (Java Secure Sockets Extension) recognizes (for example, Verisign); that is, if the signing authority is in the cacerts already. However, you might need to use the procedure if you are issuing SSL (secure sockets layer) certificates yourself.
To manually import a certificate:

   1. Go to a page on the SSL server in question.
   2. Double-click the lock icon.
   3. Click the Details tab.
   4. Click Copy To File.
   5. Select the base64 option and save the file.
   6. Copy the CER file into C:\CFusionMX7\runtime\jre\lib\security (or whichever JRE ColdFusion is using).
   7. Run the following command in the same directory (keytool.exe is located in C:\CFusionMX7\runtime\jre\bin):

      keytool -import -keystore cacerts -alias giveUniqueName -file filename.cer

http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000272.htm
0
 
LVL 39

Author Comment

by:gdemaria
ID: 17766499

 Thanks SidFishes, I am persuing that avenue but a couple stumbling blocks.

 - the certificate is signed but not by Verisign, so its unclear if its recognized or not by JSEE.  Presumably it would be.
 - we are using Linux, which the directions don't cover but..
 - we installed on Windows (following your directions above) and tested and it didn't work there

  thanks again - any more ideas greatly appreciated !
0
 
LVL 36

Expert Comment

by:SidFishes
ID: 17766558
What version of JRE are you using?

 cfhttp needs 1.4 to work

http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:25206
0
 
LVL 39

Author Comment

by:gdemaria
ID: 17767998

 Thanks Sid, I will check that out!   The urgency has subsided with a work-around.. phew..
0
 
LVL 39

Author Comment

by:gdemaria
ID: 17938441

 Thanks very much!

  Sorry I didn't return sooner to close the question
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This article provides a case study on how our local youth baseball league deployed a new website, including the platform selection, implementation and benefits to the league.
The purpose of this video is to demonstrate how to integrate Mailchimp with Facebook. This will be demonstrated using a Windows 8 PC. Mailchimp and Facebook will be used. Log into your Mailchimp account. : Click on your name. Go to Account Setti…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question