Symptom

Error when attempting to connect Commerce5 to Magento's API when the client is using an HTTPS (TLS 1.2) SSL certificate protocol.  Error Below in Commerce5:


 "An error occurred while making the HTTP request to https://*/index.php/api/v2_soap.


This could be due to the fact that the server certificate is not configured properly with HTTP.SYS in the HTTPS case.


This could also be caused by a mismatch of the security binding between the client and the server."

Cause

 TLS 1.2 and .Net Framework 4.5


.Net is also versioned. Versions below 4.5*doesn't know how to communicate via TLS 1.2.In .Net 4.5 the TLS 1.2 is enabled by default. Simply compile our applications in ,Net 4.5 and we will get TLS 1.2 communication for our applications.


 So – new website certificates using TLS 1.2 will need a new .NET 4.5 version of the application, and any customers running server 2003 cannot have 1.2 certs, even if their server connects, .NET 4 won’t.


Solution

 There is a registry hack to force 4.0 to use TLS 1.2


 The hack only works on systems with .NET 4.5 installed

 

  1. Backup customers registry
  2. Create a *.reg file with the following and merge it:

 Windows Registry Editor Version 5.00

 

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]

"SchUseStrongCrypto"=dword:00000001


 [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]

"SchUseStrongCrypto"=dword:00000001


 No server reboot needed.

Applies To

 

 The hack only works on systems with .NET 4.5 installed