HTTPS session: Client Hello missing and leading (12175) A security error occurred

Simon G 26 Reputation points
2023-01-05T17:06:11.423+00:00

Hello!
I have a C++ app using WinHttpSendRequest to send https request to a server. This app is working on lots of server, but on one of theme, fails due to "(12175) A security error occurred".
Here is what I see with Wireshark:

276568-clienthellomissing.png

I've already had "security error", that was due to TLS. But here, we can see that the TCP session is correctly established, but system doesn't even try to setup the http session there: is no Client Hello.
How could it be a security error?

I've tried to enable schannel logging to have more information, but I've got nothing relevant in the event viewer.
When reaching the server using any web browser it works normally, so there shoul be a problem with WinHTTP.

Any idea to define the cause of this error?

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management, data storage, applications, and communications.
1,758 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
8,183 questions
Windows Server Security
Windows Server Security
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
1,300 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Simon G 26 Reputation points
    2023-01-06T08:31:50.617+00:00

    Found the problem: during my debug, I had to define registry key DefaultSecureProtocols in
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp
    and
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp
    as described in this topic.

    However, I see that this topic applies to a lot of Windows version, but not windows server 2016 (which I'm using).
    I've deleted this registry keys and it works now.

    No comments