From bda8c9cd7d927443790dff469427ccf893a90cb6 Mon Sep 17 00:00:00 2001 From: Brian Hill Date: Wed, 28 Oct 2026 10:10:26 -0400 Subject: [PATCH] Advertise legacy product names in GetProductIds for CA auto-resolution Command uses GetProductIds to auto-resolve a CA for a template when none is explicitly selected, matching the template's configured product ID against each CA's advertised list. Existing Certificate Templates created before the 1.2.0 product rename are still configured with the old names (e.g. "CSC TrustedSecure EV Certificate"), which GetProductIds stopped advertising once it was switched to the canonical list only - auto-resolution then fails with "No CA was found to issue the specified template" for any legacy-named template, even though explicit CA selection still works (that path goes through the more lenient ValidateProductInfo, which already accepts legacy names). --- cscglobal-caplugin.Tests/CSCGlobalCAPluginTests.cs | 9 +++++++-- cscglobal-caplugin/CSCGlobalCAPlugin.cs | 12 ++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/cscglobal-caplugin.Tests/CSCGlobalCAPluginTests.cs b/cscglobal-caplugin.Tests/CSCGlobalCAPluginTests.cs index 16fd258..234d2ae 100644 --- a/cscglobal-caplugin.Tests/CSCGlobalCAPluginTests.cs +++ b/cscglobal-caplugin.Tests/CSCGlobalCAPluginTests.cs @@ -1154,14 +1154,19 @@ public void GetTemplateParameterAnnotations_ContainsExpectedKeys() } [Fact] - public void GetProductIds_ReturnsFullList() + public void GetProductIds_ReturnsCanonicalAndLegacyNames() { var plugin = MakePlugin(); var ids = plugin.GetProductIds(); - Assert.Equal(10, ids.Count); + // Command uses this list to auto-resolve a CA for a template when none is explicitly + // selected, so pre-1.2.0 legacy-named templates need their names advertised here too, + // not just the 10 canonical names. + Assert.Equal(17, ids.Count); Assert.Contains("CSC TrustedSecure OV", ids); Assert.Contains("CSC TrustedSecure DV Wildcard, Multiple Names", ids); + Assert.Contains("CSC TrustedSecure EV Certificate", ids); + Assert.Contains("CSC TrustedSecure Domain Validated SSL", ids); } // --------------------------------------------------------------------- diff --git a/cscglobal-caplugin/CSCGlobalCAPlugin.cs b/cscglobal-caplugin/CSCGlobalCAPlugin.cs index 33d2306..c7c62cb 100644 --- a/cscglobal-caplugin/CSCGlobalCAPlugin.cs +++ b/cscglobal-caplugin/CSCGlobalCAPlugin.cs @@ -845,8 +845,16 @@ public Dictionary GetTemplateParameterAnnotations() //done public List GetProductIds() { - - return ProductIDs.productIds; + // Command uses this list to auto-resolve a CA for a template when none is explicitly + // selected (matches a template's product ID against each CA's advertised list). Existing + // Certificate Templates created before the 1.2.0 product rename are still configured with + // the pre-1.2.0 legacy names, so those must be advertised here too, or auto-resolution + // fails for them with "No CA was found to issue the specified template" even though + // explicit CA selection still works (that path goes through the more lenient + // ValidateProductInfo, which already accepts legacy names via legacyProductIdAliases). + return ProductIDs.productIds + .Concat(ProductIDs.legacyProductIdAliases.Keys) + .ToList(); } #region PRIVATE