Browse Source

Merge pull request #21847 from abpframework/X509CertificateLoader

Using `X509CertificateLoader` instead of `new X509Certificate2`.
pull/21860/head
Engincan VESKE 1 year ago
committed by GitHub
parent
commit
847b10865e
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Microsoft/Extensions/DependencyInjection/OpenIddictServerBuilderExtensions.cs

4
modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Microsoft/Extensions/DependencyInjection/OpenIddictServerBuilderExtensions.cs

@ -13,8 +13,8 @@ public static class OpenIddictServerBuilderExtensions
}
var certificate = flag != null
? new X509Certificate2(fileName, passPhrase, flag.Value)
: new X509Certificate2(fileName, passPhrase);
? X509CertificateLoader.LoadPkcs12FromFile(fileName, passPhrase, flag.Value)
: X509CertificateLoader.LoadPkcs12FromFile(fileName, passPhrase);
builder.AddSigningCertificate(certificate);
builder.AddEncryptionCertificate(certificate);

Loading…
Cancel
Save