This code:
uses
System.Net.HttpClient;
procedure TForm2.Button1Click(Sender: TObject);
var
LHTTP: THTTPClient;
LResponse: IHTTPResponse;
begin
LHTTP := THTTPClient.Create;
try
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;
end;
end;
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?