SSL最低要求v1.2
This commit is contained in:
parent
faf3b4579c
commit
384757b9f5
@ -8,6 +8,7 @@ using System;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
|
using System.Security.Authentication;
|
||||||
|
|
||||||
namespace FastGithub
|
namespace FastGithub
|
||||||
{
|
{
|
||||||
@ -61,10 +62,11 @@ namespace FastGithub
|
|||||||
certService.CreateCaCertIfNotExists();
|
certService.CreateCaCertIfNotExists();
|
||||||
certService.InstallAndTrustCaCert();
|
certService.InstallAndTrustCaCert();
|
||||||
|
|
||||||
kestrel.Listen(IPAddress.Any, HTTPS_PORT, listen =>
|
kestrel.Listen(IPAddress.Any, HTTPS_PORT, listen => listen.UseHttps(https =>
|
||||||
listen.UseHttps(https =>
|
{
|
||||||
https.ServerCertificateSelector = (ctx, domain) =>
|
https.SslProtocols = SslProtocols.Tls12 | SslProtocols.Tls13;
|
||||||
certService.GetOrCreateServerCert(domain)));
|
https.ServerCertificateSelector = (ctx, domain) => certService.GetOrCreateServerCert(domain);
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -60,7 +60,7 @@ namespace FastGithub.ReverseProxy
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.logger.LogError($"{message}{Environment.NewLine}{exception}");
|
this.logger.LogError($"{message}{Environment.NewLine}{exception.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user