Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/aspnetcore.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier Calvarro Nelson <jacalvar@microsoft.com>2020-05-08 04:41:52 +0300
committerGitHub <noreply@github.com>2020-05-08 04:41:52 +0300
commitcdfa43bbe0ecc13757cc6517c9a253de77c3ec56 (patch)
treeefe292e4affb6a527089946fc9e146d5ff56963c
parente129d00910dace96203fac093ab144aac7706665 (diff)
Avoid trying to fix the trusted root certificates (#21599)v5.0.0-preview.4.20257.10
-rw-r--r--src/Shared/CertificateGeneration/CertificateManager.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Shared/CertificateGeneration/CertificateManager.cs b/src/Shared/CertificateGeneration/CertificateManager.cs
index 5fc4cd6b57..5c0d853976 100644
--- a/src/Shared/CertificateGeneration/CertificateManager.cs
+++ b/src/Shared/CertificateGeneration/CertificateManager.cs
@@ -157,8 +157,9 @@ namespace Microsoft.AspNetCore.Certificates.Generation
{
var result = EnsureCertificateResult.Succeeded;
- var certificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true).Concat(
- ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true));
+ var currentUserCertificates = ListCertificates(StoreName.My, StoreLocation.CurrentUser, isValid: true, requireExportable: true);
+ var trustedCertificates = ListCertificates(StoreName.My, StoreLocation.LocalMachine, isValid: true, requireExportable: true);
+ var certificates = currentUserCertificates.Concat(trustedCertificates);
var filteredCertificates = certificates.Where(c => c.Subject == Subject);
var excludedCertificates = certificates.Except(filteredCertificates);
@@ -177,7 +178,7 @@ namespace Microsoft.AspNetCore.Certificates.Generation
{
// Skip this step if the command is not interactive,
// as we don't want to prompt on first run experience.
- foreach (var candidate in certificates)
+ foreach (var candidate in currentUserCertificates)
{
var status = CheckCertificateState(candidate, true);
if (!status.Result)