Problem:
The same application that calls WinHTTP successfully with HTTP fails to work with HTTPS even if zero is returned (in ws-res on the example below):
INVOKE ws-winhttp "Open" USING z"POST" WS-CALL-HOST *> containing URL with HTTPS ws-boolfalse RETURNING ws-res INVOKE ws-winhttp "Send" USING ws-vartext RETURNING ws-res
Solution:
There is no code change required.
As explained in the following Microsoft link, an update for Windows and setting up a registry key are required:
https://support.microsoft.com/en-gb/help/3140245/update-to-enable-tls-1.1-and-tls-1.2-as-a-default-secure-protocols-in-winhttp-in-windows
The program should work fine after adding DefaultSecureProtocols with the DWORD value of A00 in HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\WinHttp
#winHttp
#netexpress