Skip to content

Commit 72bfa8f

Browse files
author
John Luo
authored
Merge pull request #21605 from dotnet-maestro-bot/merge/release/5.0-preview4-to-master
[automated] Merge branch 'release/5.0-preview4' => 'master'
2 parents 1435cfa + 81d269d commit 72bfa8f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Shared/CertificateGeneration/CertificateManager.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,9 @@ public EnsureCertificateResult EnsureAspNetCoreHttpsDevelopmentCertificate(
157157
{
158158
var result = EnsureCertificateResult.Succeeded;
159159

160-
var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true).Concat(
161-
ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true));
160+
var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true);
161+
var trustedCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true);
162+
var certificates = currentUserCertificates.Concat(trustedCertificates);
162163

163164
var filteredCertificates = certificates.Where(c => c.Subject == Subject);
164165
var excludedCertificates = certificates.Except(filteredCertificates);
@@ -177,7 +178,7 @@ public EnsureCertificateResult EnsureAspNetCoreHttpsDevelopmentCertificate(
177178
{
178179
// Skip this step if the command is not interactive,
179180
// as we don't want to prompt on first run experience.
180-
foreach (var candidate in certificates)
181+
foreach (var candidate in currentUserCertificates)
181182
{
182183
var status = CheckCertificateState(candidate, true);
183184
if (!status.Result)

0 commit comments

Comments
 (0)