Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
LHTTP.SecureProtocols := [THTTPSecureProtocol.TLS13];
LResponse := LHTTP.Get('https://tls13.1d.pw'); // TLS 1.3 ONLY site
if LResponse.StatusCode = 200 then
ShowMessage('TLS 1.3 worked');
finally
LHTTP.Free;
Results in:
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class ENetHTTPClientException with message 'Error sending data: (12175) A security error occurred'.
---------------------------
Break Continue Help Copy
---------------------------
Using Windows 10 (The same code works on Windows 11). I've gone into the Internet Options settings in Windows and enabled TLS 1.3, however that does not resolve the issue.
Anything else I need to do?
ERROR_WINHTTP_SECURE_FAILURE
12175
One or more errors were found in the Secure Sockets Layer (SSL) certificate sent by the server. To determine what type of error was encountered, check for a WINHTTP_CALLBACK_STATUS_SECURE_FAILURE
notification in a status callback function. For more information, see WINHTTP_STATUS_CALLBACK
.
Unfortunately, THTTPClient
does not provide access for you to use such a callback, but it does use an internal callback to capture the reason for ERROR_WINHTTP_SECURE_FAILURE
in its SecureFailureReasons
property. So you can check that for more info.
Are you sure you enabled TLS 1.3 on Windows 10? Are you using build 1903 or later? Earlier builds do not support TLS 1.3.
how to enable TLS 1.3 in windows 10
–
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.