此代码:
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;
在以下方面的成果:
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class ENetHTTPClientException with message 'Error sending data: (12175) A security error occurred'.
---------------------------
Break Continue Help Copy
---------------------------
使用Windows 10 (在Windows 11上使用相同的代码)。我已经进入了Windows中的Internet选项设置并启用了TLS 1.3,但是这并不能解决这个问题。
还有什么我需要做的吗?
https://stackoverflow.com/questions/71506537
复制相似问题