Skip to content

Commit

Permalink
Fix openid certificates on Azure App Services
Browse files Browse the repository at this point in the history
Fixes #3222
  • Loading branch information
sebastienros committed Feb 28, 2019
1 parent 88a22c3 commit aa9424e
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -497,11 +497,14 @@ private async Task<ImmutableArray<(string path, X509Certificate2 certificate)>>
X509KeyStorageFlags.EphemeralKeySet :
X509KeyStorageFlags.MachineKeySet;
#else
X509KeyStorageFlags.MachineKeySet;
X509KeyStorageFlags.MachineKeySet |
X509KeyStorageFlags.PersistKeySet |
X509KeyStorageFlags.Exportable;
#endif

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

if (certificate.NotBefore <= DateTime.Now && certificate.NotAfter > DateTime.Now)
{
certificates.Add((file.FullName, certificate));
Expand Down

0 comments on commit aa9424e

Please sign in to comment.