Coldfusion cfhttp with HTTPS not working although all certificates installed

I know this question has been asked a lot already, but although I've been searching for days now I didn't find a suitable answer.

We are running Coldfusion 9 Standard with JDK 1.7. I'm trying to perform a request with cfhttp, following code:

 <cfhttp url="Https://subdomain.example.com" method="get"  result="result" username="#myUsername#" password="#myPassword#" />

I get the following when dumping out the result:

[

I already imported all certificates in the certificate chain to the right keystore. The CA is Let's Encrypt. Funny thing is, we have another site from which we are asking a webservice, also with certificate from Let's Encrypt and it is working. Accessed from the same Coldfusion server.

I also tried following code in onApplicationStart in Application.cfc, but didn't work:

<cfif NOT isDefined("Application.sslfix")>
    <cfset objSecurity = createObject("java", "java.security.Security") />
    <cfset objSecurity.removeProvider("JsafeJCE") />
    <cfset Application.sslfix = true />
</cfif> 

I simply had to add port="443" to the cfhttp tag, which made the following code works just fine:

<cfhttp port="443" url="Https://subdomain.example.com" 
   method="get" 
   result="result" 
   username="#myUsername#" 
   password="#myPassword#" />

I'm crying because I didn't try that earlier. Strange thing is that with the other request I don't have to specify the port and it works fine.

I also removed the setting below from the JVM Settings. It didn't have any effect on my problem.

-Dhttps.protocols=TLSv1.1,TLSv1.2
链接地址: http://www.djcxy.com/p/812.html

上一篇: 在iis中,服务器端渲染不适用于角度通用

下一篇: 虽然安装了所有证书,但HTTPS的Coldfusion cfhttp无法正常工作