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
|
||||
{
|
||||
var key = builder.Configuration["YavscSigningCert"];
|
||||
Debug.Assert(key != null);
|
||||
var pfxBytes = Convert.FromBase64String(key);
|
||||
var cert = new X509Certificate2(pfxBytes, (string)null, X509KeyStorageFlags.MachineKeySet);
|
||||
var path = builder.Configuration["Kestrel:Endpoints:Https:KeyPath"];
|
||||
var pass = builder.Configuration["Kestrel:Endpoints:Https:Password"];
|
||||
Debug.Assert(path != null);
|
||||
FileInfo certFileInfo = new FileInfo(path);
|
||||
Debug.Assert(certFileInfo.Exists);
|
||||
var cert = new X509Certificate2(path, pass);
|
||||
identityServerBuilder.AddSigningCredential(cert);
|
||||
}
|
||||
return identityServerBuilder;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue