Skip to content

Commit bcdf95a

Browse files
committed
Fix openid certificates on Azure App Services #2
1 parent aa9424e commit bcdf95a

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/OrchardCore.Modules/OrchardCore.OpenId/Services/OpenIdServerService.cs

+1-8
Original file line numberDiff line numberDiff line change
@@ -491,16 +491,9 @@ private static X509Certificate2 GetCertificate(StoreLocation location, StoreName
491491
// Extract the certificate password from the separate .pwd file.
492492
var password = await GetPasswordAsync(Path.ChangeExtension(file.FullName, ".pwd"));
493493

494-
var flags =
495-
#if SUPPORTS_EPHEMERAL_KEY_SETS
496-
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ?
497-
X509KeyStorageFlags.EphemeralKeySet :
498-
X509KeyStorageFlags.MachineKeySet;
499-
#else
500-
X509KeyStorageFlags.MachineKeySet |
494+
var flags = X509KeyStorageFlags.MachineKeySet |
501495
X509KeyStorageFlags.PersistKeySet |
502496
X509KeyStorageFlags.Exportable;
503-
#endif
504497

505498
// Only add the certificate if it's still valid.
506499
var certificate = new X509Certificate2(file.FullName, password, flags);

0 commit comments

Comments
 (0)