On Thu, Nov 12, 2026 at 08:48:58PM +0800, Kevin J. McCarthy wrote:
I'll add another commit to the end of the series, like this:/* This checks for embedded nuls */ if (mutt_buffer_len(common_name_buf) == mutt_strlen(mutt_b2s(common_name_buf))) - match_found = hostname_match(hostname_ascii, mutt_b2s(common_name_buf)); + { + hostname_utf8 = safe_strdup(hostname); + if (!mutt_convert_string(&hostname_utf8, Charset, "utf-8", 0)) + match_found = hostname_match(hostname_utf8, mutt_b2s(common_name_buf)); + } } if (!match_found)with hostname_utf8 variable initialization to NULL and a FREE() in the cleanup at the bottom.
Thinking about it overnight, this is wrong direction to convert. We already have hostname_ascii in punycode. So it makes since to convert the common_name_buf to punycode instead, using idna_to_ascii_8z(). I believe punycode normalizes the utf-8, and that's why the comparsion is used for DNS, so we should use it for the CN too.
I'll make that change and send another patch series out, probably tomorrow.
Another possibility is just taking out the CN comparison completely. RFC 9525 was issued November 2023. Does anyone have an opinion about that?
I'm still interested in others opinions about this though. Thanks! -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA
signature.asc
Description: PGP signature
