IWinHttpRequest interface was working fine until TLS version has been changed from Server side. TLS version of server has been changed to TLSv1.1 and higher.
because of this change I am not able to get any response from server.
So I decided to use WinHttpSetOption to set protocol version. but it doesn't work.
Please anybody can help me?
What I have tried:
IWinHttpRequest interface was working fine until TLS version has been changed from Server side. TLS version of server has been changed to TLSv1.1 and higher.
because of this change I am not able to get any response from server.
So I decided to use WinHttpSetOption to set protocol version. but it doesn't work.
The below code is where I set the options.
dwVal = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1 | WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
bRet = WinHttpSetOption(request_,WINHTTP_OPTION_SECURE_PROTOCOLS,&dwVal,sizeof(dwVal));
if(!bRet)
{
TRACE("error - " , GetLastError());
break;
}
The above code doers not yield any error code although the return code for setoption is zero.