I have an application written using C++ and built with VS2008 (hence using Windows SDK v6.0a). I am using WinHTTP
APIs to communicate with server and want to use WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2
so that I can use TLS1.2 protocol while connecting to server. But since I am using v6.0a I can not use the WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2
as its available only from v7.0a onwards. However, I found that if I do #define
of WINHTTP_FLAG_SECURE_PROTOCOL_TLS1
_2 in my code (using same value which windows is using) and pass it to the API the connection happens in TLS1.2. I also saw that WinHTTP.dll
is picked up from system32 folder. Hence is this a valid workaround to use Win32 APIs like this?
Asked
Active
Viewed 1,552 times
0

Asha
- 11,002
- 6
- 44
- 66
-
IMO yes it's a valid workaround. WinHTTP.dll is not part of the SDK but it's part of the operating system. – Jabberwocky Feb 11 '16 at 08:10
-
So then, why aren't you using the [Microsoft SDK for Windows 7](https://www.microsoft.com/en-us/download/details.aspx?id=8279)? It is compatible with Visual Studio 2005, 2008, and 2010. – IInspectable Feb 11 '16 at 13:03
-
I am getting error `12030` Please see: https://stackoverflow.com/questions/59730223/receiving-12030-at-winhttpreceiveresponse – Ahmed Can Unbay Jan 14 '20 at 13:35