Skip to content

Commit 11bbe5a

Browse files
committed
Alternatively load the certificate by thumbprint from the machines Certificate Store.
1 parent 16be0ef commit 11bbe5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/TestWebAppCore/Startup.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ public void ConfigureServices(IServiceCollection services)
3333
{
3434
//saml2Configuration.SignAuthnRequest = true;
3535
saml2Configuration.SigningCertificate = CertificateUtil.Load(AppEnvironment.MapToPhysicalFilePath(Configuration["Saml2:SigningCertificateFile"]), Configuration["Saml2:SigningCertificatePassword"], X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet);
36+
//Alternatively load the certificate by thumbprint from the machines Certificate Store.
37+
//saml2Configuration.SigningCertificate = CertificateUtil.Load(StoreName.My, StoreLocation.LocalMachine, X509FindType.FindByThumbprint, Configuration["Saml2:SigningCertificateThumbprint"]);
3638

3739
//saml2Configuration.SignatureValidationCertificates.Add(CertificateUtil.Load(AppEnvironment.MapToPhysicalFilePath(Configuration["Saml2:SignatureValidationCertificateFile"])));
3840
saml2Configuration.AllowedAudienceUris.Add(saml2Configuration.Issuer);

0 commit comments

Comments
 (0)