-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HttpClient requests only support Tls1.3 Website request failure #100799
Comments
Tagging subscribers to this area: @dotnet/ncl |
What if you set |
@huoyaoyuan I set this attribute, but it still throw the same exception. var url = "only support tls 1.3 website url";
var httpClientHandler = new HttpClientHandler();
httpClientHandler.ServerCertificateCustomValidationCallback = HttpClientHandler.DangerousAcceptAnyServerCertificateValidator;
httpClientHandler.SslProtocols = System.Security.Authentication.SslProtocols.Tls11
| System.Security.Authentication.SslProtocols.Tls12
| System.Security.Authentication.SslProtocols.Tls13;
var client = new HttpClient(httpClientHandler);
var response = client.GetAsync(url).Result;
Console.ReadKey(); |
How about |
@huoyaoyuan I found that it works under windows11, and I think it has something to do with the operating system. |
TLS1.3 support on macOS is tracked at #1979. |
Description
The HttpClient request only supports Tls1.3 website request failure, indicating that the SSL link fails to be established and that the bad protocol version is displayed internally in windows. Display platform not supported in apple environment
Reproduction Steps
Create an httpClient. Select any website that supports only tls1.3 to make a get request
Expected behavior
请求返回成功
Actual behavior
发生异常, 建立ssl链接失败
Regression?
No response
Known Workarounds
No response
Configuration
dotnet version: .net 8
OS: MacOs 14.4.1(ARM) or windows 11(x64)
Other information
No response
The text was updated successfully, but these errors were encountered: