From 49d2d6f710fc2aba49476042678fec6bcb5db399 Mon Sep 17 00:00:00 2001 From: Brian Hill Date: Thu, 6 Nov 2025 10:22:36 -0500 Subject: [PATCH 1/2] fixed dns issue --- AcmeCaPlugin/AcmeCaPlugin.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/AcmeCaPlugin/AcmeCaPlugin.cs b/AcmeCaPlugin/AcmeCaPlugin.cs index b1f8553..1c3d432 100644 --- a/AcmeCaPlugin/AcmeCaPlugin.cs +++ b/AcmeCaPlugin/AcmeCaPlugin.cs @@ -321,10 +321,14 @@ private static string ExtractDomainFromSubject(string subject) if (string.IsNullOrWhiteSpace(subject)) throw new ArgumentException("Subject cannot be null or empty", nameof(subject)); - return subject - .Replace("CN=", "", StringComparison.OrdinalIgnoreCase) - .Replace("cn=", "", StringComparison.OrdinalIgnoreCase) - .Trim(); + // Match CN=value (capturing everything until comma or end of string) + var match = Regex.Match(subject, @"CN=([^,]+)", RegexOptions.IgnoreCase); + if (match.Success) + { + return match.Groups[1].Value.Trim(); + } + + throw new ArgumentException($"Could not extract CN from subject: {subject}", nameof(subject)); } /// From da525eded0a07fde8169fe3be112fd0b488e9f74 Mon Sep 17 00:00:00 2001 From: Brian Hill <76450501+bhillkeyfactor@users.noreply.github.com> Date: Thu, 6 Nov 2025 10:25:53 -0500 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4709a5..ebb90b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -# v1.0.1 +# v1.0.2 +* Fix DNS issue when fields outside domain are in the subject + + # v1.0.1 * Added build for `.net8` # v1.0.0