Re: [exim/exim] [Bug]: GNUTLS certificate validation incompatible with certificates lacking a commonName attribute (Issue #3215)

Andreas Metzler via Exim-dev <[email protected]> Wed, 15 Apr 2026 10:30:46 +0200
Newsgroups gmane.mail.exim.devel
Message-ID <[email protected]>
On 2026-04-14 adsbarratt via Exim-dev <[email protected]> wrote:
[...]
> 16:02:59 702757 TLS: checking peer certificate
> 16:02:59 702757 TLS: peer cert problem: getting size for cert DN failed: The requested data were not available.
[...]

That is
sz = 0;
rc = gnutls_x509_crt_get_dn(crt, NULL, &sz);
if (rc != GNUTLS_E_SHORT_MEMORY_BUFFER)
  {
  exim_gnutls_peer_err(US"getting size for cert DN failed");
  return FAIL; /* should not happen */
  }

Which does happen if there is no Subject.

cu Andreas
-- 
"You people are noisy," Nia said.
I made the gesture of agreement.