Skip to content

Commit 3403003

Browse files
authored
Merge 4793ccd into 0b2d104
2 parents 0b2d104 + 4793ccd commit 3403003

File tree

7 files changed

+323
-163
lines changed

7 files changed

+323
-163
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2.6.3
2+
* Fixed reenrollment job when RDN Components contained escaped commas
3+
* Updated renewal job for IIS Certs to delete the old cert if not bound or used by other web sites.
4+
* Improved Inventory reporting of CSP when cert uses newer CNG Keys
5+
* Fixed an issue with complex PFX passwords that contained special characters such as '@' or '$', etc.
6+
17
2.6.2
28
* Fixed error when attempting to connect to remote computer using UO service account
39
* Fixed error when connecting to remote computer using HTTPS; was defaulting to HTTP

IISU/ImplementedStoreTypes/WinIIS/Inventory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public JobResult ProcessJob(InventoryJobConfiguration jobConfiguration, SubmitIn
9595
{
9696
Result = OrchestratorJobStatusJobResult.Success,
9797
JobHistoryId = jobConfiguration.JobHistoryId,
98-
FailureMessage = ""
98+
FailureMessage = $"Inventory completed returning {inventoryItems.Count} Items."
9999
};
100100
}
101101

IISU/ImplementedStoreTypes/WinIIS/Management.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
using System;
1717
using System.Collections.Generic;
1818
using System.Collections.ObjectModel;
19+
using System.Linq;
1920
using System.Management.Automation;
2021
using Keyfactor.Extensions.Orchestrator.WindowsCertStore.Models;
2122
using Keyfactor.Logging;
@@ -89,6 +90,7 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
8990
string protocol = jobProperties?.WinRmProtocol;
9091
string port = jobProperties?.WinRmPort;
9192
bool includePortInSPN = (bool)jobProperties?.SpnPortFlag;
93+
string alias = config.JobCertificate?.Alias?.Split(':').FirstOrDefault() ?? string.Empty; // Thumbprint is first part of the alias
9294

9395
_psHelper = new(protocol, port, includePortInSPN, _clientMachineName, serverUserName, serverPassword);
9496

@@ -171,6 +173,14 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
171173
psResult = OrchestratorJobStatusJobResult.Unknown;
172174
}
173175

176+
// Only is the binding returns successful, check of original cert is still bound to any site, if not remove it from the store
177+
if (psResult == OrchestratorJobStatusJobResult.Success && !string.IsNullOrEmpty(alias))
178+
{
179+
_logger.LogTrace("Attempting to remove original certificate from store if it is no longer bound to any site.");
180+
RemoveIISCertificate(alias);
181+
_logger.LogTrace("Returned from removing cert if not used.");
182+
}
183+
174184
complete = new JobResult
175185
{
176186
Result = psResult,

0 commit comments

Comments
 (0)