Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Application fails to call WinHTTP with HTTPS

Application fails to call WinHTTP with HTTPS

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

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
2 of 2
Last update:
‎2019-03-01 22:10
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.