🐛 Fix certificate loading
This commit is contained in:
@@ -24,12 +24,6 @@ public static class KestrelConfiguration
|
|||||||
|
|
||||||
// Load PEM cert and key manually
|
// Load PEM cert and key manually
|
||||||
var certificate = X509Certificate2.CreateFromPemFile(certPath, keyPath);
|
var certificate = X509Certificate2.CreateFromPemFile(certPath, keyPath);
|
||||||
|
|
||||||
// You MUST call this to make sure the key is usable
|
|
||||||
certificate = certificate.CopyWithPrivateKey(
|
|
||||||
RSA.Create()
|
|
||||||
);
|
|
||||||
|
|
||||||
// Now pass the full cert
|
// Now pass the full cert
|
||||||
options.ListenAnyIP(5001, listenOptions =>
|
options.ListenAnyIP(5001, listenOptions =>
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user