diff --git a/FastGithub.Http/HttpClientHandler.cs b/FastGithub.Http/HttpClientHandler.cs index acaaf40..db608cc 100644 --- a/FastGithub.Http/HttpClientHandler.cs +++ b/FastGithub.Http/HttpClientHandler.cs @@ -8,6 +8,7 @@ using System.Net; using System.Net.Http; using System.Net.Security; using System.Net.Sockets; +using System.Security.Authentication; using System.Security.Cryptography.X509Certificates; using System.Threading; using System.Threading.Tasks; @@ -172,6 +173,7 @@ namespace FastGithub.Http var sslStream = new SslStream(stream, leaveInnerStreamOpen: false); await sslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions { + EnabledSslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13, TargetHost = requestContext.TlsSniPattern.Value, RemoteCertificateValidationCallback = ValidateServerCertificate }, cancellationToken);