判断windows版本
This commit is contained in:
parent
384757b9f5
commit
d594f9d794
@ -63,8 +63,11 @@ namespace FastGithub
|
||||
certService.InstallAndTrustCaCert();
|
||||
|
||||
kestrel.Listen(IPAddress.Any, HTTPS_PORT, listen => listen.UseHttps(https =>
|
||||
{
|
||||
if (OperatingSystem.IsWindows() && Environment.OSVersion.Version < new Version(6, 2))
|
||||
{
|
||||
https.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13;
|
||||
}
|
||||
https.ServerCertificateSelector = (ctx, domain) => certService.GetOrCreateServerCert(domain);
|
||||
}));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user