(Apologies for the length. I was attempting to work out some details applicable to common distributions like Debian and Fedora. It was a larger rabbit hole than I'd have liked.)
Dan Fandrich wrote: > On Fri, Nov 13, 2026 at 01:23:55PM +0800, Kevin J. McCarthy wrote: >> Having the variable point to another value, while still being independent, >> isn't easy. But I >> think I can set up a check in configure.ac and scan a fixed list of places >> for >> ssl_ca_certificates_file. > > FWIW, curl does something similar here: > https://github.com/curl/curl/blob/4f2b5fba5212a32c4e4a889492cc153e1220e619/acinclude.m4#L1009 Handy, though for OpenSSL, I think the current approach is to let the library handle loading the trusted CA list by default. I don't know whether GnuTLS has any similar ability. I notice the entry for Red Hat and Mandriva is: /etc/pki/tls/certs/ca-bundle.crt Fedora 44 (the now-oldstable) dropped that compatibility symlink. The change page for this suggests the ideal thing for applications is not point to any specific PEM bundle, but use the OpenSSL library defaults. https://fedoraproject.org/wiki/Changes/droppingOfCertPemFile The fallback path for a PEM ca-bundle.crt on Fedora is (the unwieldy): /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem I don't know if it's worth trying to maintain a list of paths which differ across distributions when a better end state seems to be not specifying a flat ca-bundle at all? (That depends on whether GnuTLS can also work without explicitly setting a CA bundle.) The Fedora change document says this is also a performance improvement: Applications using OpenSSL(possibly other libraries as well) will benefit from much faster initialization of OpenSSL. This will be especially significant with the bring of Post-Quantum certificates. I _think_ that is in line with upstream OpenSSL, but I don't follow the project closely enough to be sure of that. If Fedora is going off on their own (and I hope they are not), they are likely best left to manually specify the path to a fallback bundle or otherwise patch Mutt and similar apps. Looking further, it seems that Mutt already does default to using the default system store when OpenSSL is the backend. But the Debian and Fedora packages both use GNU TLS rather than OpenSSL. It looks like Debian has done that for a long time and I am _guessing_ that might be due to the incompatibility of older OpenSSL and GPLv2. Fedora seemingly does it because the OpenSSL code violates their Crypto Policies* -- presumably because it sets the cipher list, though GnuTLS does the same and they simply patch it out. So maybe they chose GnuTLS for another reason and a later package maintainer just assumed the reason. * This goes back many, many years and there aren't good commit messages to help work out why they chose GnuTLS or what they feel is out of line with the OpenSSL support. https://src.fedoraproject.org/rpms/mutt/blob/rawhide/f/mutt.spec#_103-107 The `ssl_ca_certificates_file` only applies to GnuTLS, so unless you want to include the tls-ca-bundle.pem path I mentioned earlier in a list of locations to check, it might end up that Fedora still has to either patch the code or set the `ssl_ca_certificates_file` default in their packages. -- Todd
signature.asc
Description: PGP signature
