Skip to content

Commit e158c0f

Browse files
committed
修复linux下TlsIgnoreNameMismatch可能无效的问题
1 parent 78bf276 commit e158c0f

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

FastGithub.Http/HttpClientHandler.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using FastGithub.Configuration;
2-
using FastGithub.DomainResolve;
1+
using FastGithub.DomainResolve;
32
using System;
43
using System.Collections;
54
using System.Collections.Generic;
@@ -125,7 +124,7 @@ await sslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions
125124

126125
bool ValidateServerCertificate(object sender, X509Certificate? cert, X509Chain? chain, SslPolicyErrors errors)
127126
{
128-
if (errors == SslPolicyErrors.RemoteCertificateNameMismatch)
127+
if (errors.HasFlag(SslPolicyErrors.RemoteCertificateNameMismatch))
129128
{
130129
if (this.domainConfig.TlsIgnoreNameMismatch == true)
131130
{

0 commit comments

Comments
 (0)