排除vscode

This commit is contained in:
陈国伟 2021-10-22 10:37:36 +08:00
parent 3df09d549e
commit 54fa76488b
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,7 @@ using System.Net.Http;
using System.Net.Security; using System.Net.Security;
using System.Net.Sockets; using System.Net.Sockets;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Security.Authentication;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
@ -143,6 +144,7 @@ namespace FastGithub.Http
await sslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions await sslStream.AuthenticateAsClientAsync(new SslClientAuthenticationOptions
{ {
TargetHost = tlsSniValue.Value, TargetHost = tlsSniValue.Value,
EnabledSslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13,
RemoteCertificateValidationCallback = ValidateServerCertificate RemoteCertificateValidationCallback = ValidateServerCertificate
}, cancellationToken); }, cancellationToken);

View File

@ -13,6 +13,9 @@
"gist.github.com": { "gist.github.com": {
"TlsIgnoreNameMismatch": true "TlsIgnoreNameMismatch": true
}, },
"vscode-auth.github.com": {
"TlsSni": true
},
"*.github.com": { "*.github.com": {
"TlsIgnoreNameMismatch": true "TlsIgnoreNameMismatch": true
}, },