From e158c0f4c11943c5d313f21588b412f13a990e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=9B=BD=E4=BC=9F?= <366193849@qq.com> Date: Wed, 18 Aug 2021 14:22:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dlinux=E4=B8=8BTlsIgnoreNameMi?= =?UTF-8?q?smatch=E5=8F=AF=E8=83=BD=E6=97=A0=E6=95=88=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FastGithub.Http/HttpClientHandler.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/FastGithub.Http/HttpClientHandler.cs b/FastGithub.Http/HttpClientHandler.cs index 2f61176..80ec17a 100644 --- a/FastGithub.Http/HttpClientHandler.cs +++ b/FastGithub.Http/HttpClientHandler.cs @@ -1,5 +1,4 @@ -using FastGithub.Configuration; -using FastGithub.DomainResolve; +using FastGithub.DomainResolve; using System; using System.Collections; using System.Collections.Generic; @@ -125,7 +124,7 @@ namespace FastGithub.Http bool ValidateServerCertificate(object sender, X509Certificate? cert, X509Chain? chain, SslPolicyErrors errors) { - if (errors == SslPolicyErrors.RemoteCertificateNameMismatch) + if (errors.HasFlag(SslPolicyErrors.RemoteCertificateNameMismatch)) { if (this.domainConfig.TlsIgnoreNameMismatch == true) {