Solved

Unable to post to Secure URL using CFHTTP (Urgent)

Posted on 2006-10-19
5
658 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Server specifications for web hosting 7 93
Unsearchable in Google,Yahoo and Bing. 6 63
assigning port numbers to web sites and web services 2 78
WEB Farm 6 74
In this short web based tutorial, I wanted to show users how they can still use the powers of FrontPage in conjunction with Expression Web 3.  Even though Microsoft eliminated the use of Web components, we can still use them with FrontPage and edit …
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to integrate Mailchimp with WordPress, by placing a Mailchimp signup form on a WordPress Page or Post. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchi…

840 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