Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions AcmeCaPlugin/AcmeCaPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

/// <summary>
Expand Down
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# v1.0.1
# v1.0.2
* Fix DNS issue when fields outside domain are in the subject

# v1.0.1
Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent markdown formatting: This header has a leading space before the # which breaks markdown formatting. It should be # v1.0.1 without the leading space to match the format of other headers.

Suggested change
# v1.0.1
# v1.0.1

Copilot uses AI. Check for mistakes.
* Added build for `.net8`

# v1.0.0
Expand Down
Loading