a better behavior
This commit is contained in:
parent
e696db9258
commit
17a0878d59
1 changed files with 6 additions and 4 deletions
|
|
@ -300,10 +300,12 @@ public static class HostingExtensions
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var key = builder.Configuration["YavscSigningCert"];
|
var path = builder.Configuration["Kestrel:Endpoints:Https:KeyPath"];
|
||||||
Debug.Assert(key != null);
|
var pass = builder.Configuration["Kestrel:Endpoints:Https:Password"];
|
||||||
var pfxBytes = Convert.FromBase64String(key);
|
Debug.Assert(path != null);
|
||||||
var cert = new X509Certificate2(pfxBytes, (string)null, X509KeyStorageFlags.MachineKeySet);
|
FileInfo certFileInfo = new FileInfo(path);
|
||||||
|
Debug.Assert(certFileInfo.Exists);
|
||||||
|
var cert = new X509Certificate2(path, pass);
|
||||||
identityServerBuilder.AddSigningCredential(cert);
|
identityServerBuilder.AddSigningCredential(cert);
|
||||||
}
|
}
|
||||||
return identityServerBuilder;
|
return identityServerBuilder;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue