From 32dafd49d041bde8a686d57c823a1b7c52ffc807 Mon Sep 17 00:00:00 2001 From: webprofusion-chrisc Date: Mon, 12 Aug 2024 14:10:32 +0800 Subject: [PATCH] Cleanup rebase from release branch --- src/Certify.Client/CertifyServiceClient.cs | 2 +- .../CertifyManager.Maintenance.cs | 23 ------------------- .../Config/CertRequestConfig.cs | 2 -- src/Certify.Models/Util/EnvironmentUtil.cs | 3 +++ .../Management/CertificateManager.cs | 3 --- 5 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/Certify.Client/CertifyServiceClient.cs b/src/Certify.Client/CertifyServiceClient.cs index d09128a3e..2f743fc06 100644 --- a/src/Certify.Client/CertifyServiceClient.cs +++ b/src/Certify.Client/CertifyServiceClient.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading.Tasks; using Certify.Models; diff --git a/src/Certify.Core/Management/CertifyManager/CertifyManager.Maintenance.cs b/src/Certify.Core/Management/CertifyManager/CertifyManager.Maintenance.cs index df01cbdef..0dfb52078 100644 --- a/src/Certify.Core/Management/CertifyManager/CertifyManager.Maintenance.cs +++ b/src/Certify.Core/Management/CertifyManager/CertifyManager.Maintenance.cs @@ -15,29 +15,6 @@ namespace Certify.Management { public partial class CertifyManager { - /// - /// Upgrade/migrate settings from previous version if applicable - /// - /// - private async Task UpgradeSettings() - { - var systemVersion = Util.GetAppVersion().ToString(); - var previousVersion = CoreAppSettings.Current.CurrentServiceVersion; - - if (CoreAppSettings.Current.CurrentServiceVersion != systemVersion) - { - _tc?.TrackEvent("ServiceUpgrade", new Dictionary { - { "previousVersion", previousVersion }, - { "currentVersion", systemVersion } - }); - - // service has been updated, run any required migrations - await PerformServiceUpgrades(); - - CoreAppSettings.Current.CurrentServiceVersion = systemVersion; - SettingsManager.SaveAppSettings(); - } - } /// /// Upgrade/migrate settings from previous version if applicable diff --git a/src/Certify.Models/Config/CertRequestConfig.cs b/src/Certify.Models/Config/CertRequestConfig.cs index 8492dc4cc..d57cb32c4 100644 --- a/src/Certify.Models/Config/CertRequestConfig.cs +++ b/src/Certify.Models/Config/CertRequestConfig.cs @@ -343,8 +343,6 @@ internal List GetCertificateDomains() private static JsonSerializerOptions _defaultJsonSerializerOptions = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; - private static JsonSerializerOptions _defaultJsonSerializerOptions = new JsonSerializerOptions { PropertyNameCaseInsensitive = true }; - public List GetCertificateIdentifiers() { var identifiers = new List(); diff --git a/src/Certify.Models/Util/EnvironmentUtil.cs b/src/Certify.Models/Util/EnvironmentUtil.cs index c3d0cd38e..7051f35bb 100644 --- a/src/Certify.Models/Util/EnvironmentUtil.cs +++ b/src/Certify.Models/Util/EnvironmentUtil.cs @@ -1,6 +1,9 @@ using System; using System.Collections.Generic; using System.IO; +using System.Runtime.InteropServices; +using System.Security.AccessControl; +using System.Security.Principal; namespace Certify.Models { diff --git a/src/Certify.Shared/Management/CertificateManager.cs b/src/Certify.Shared/Management/CertificateManager.cs index 85eb83bc0..13bcc8b3c 100644 --- a/src/Certify.Shared/Management/CertificateManager.cs +++ b/src/Certify.Shared/Management/CertificateManager.cs @@ -752,9 +752,6 @@ private static string GetWindowsPrivateKeyLocation(string keyFileName) // if EC/CNG key may be under /keys machineKeyPath = Path.Combine(new string[] { appDataPath, "Microsoft", "Crypto", "Keys" }); - // if EC/CNG key may be under /keys - machineKeyPath = Path.Combine(new string[] { appDataPath, "Microsoft", "Crypto", "Keys" }); - fileList = Directory.GetFiles(machineKeyPath, keyFileName); if (fileList.Any())