From 4ca66b1e03b5812e5b366573dbe1b1cedd018914 Mon Sep 17 00:00:00 2001 From: yusufipk Date: Sun, 16 Aug 2026 15:29:29 +0300 Subject: [PATCH] Carry the two paths the RHEL family uses as well The list was four of the six that Go's crypto/x509 and curl both carry. The missing two are the bundle under /etc/pki/ca-trust, which is where RHEL 7 and CentOS keep it, and OpenELEC's. Neither is likely and both are one line. The rest was checked in containers rather than assumed: the first entry answers Debian, Ubuntu, Arch, Gentoo, Fedora and Alpine, and openSUSE is the only common distribution that needs a different one. --- dikte/integrate.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dikte/integrate.py b/dikte/integrate.py index f96a118..0af3744 100644 --- a/dikte/integrate.py +++ b/dikte/integrate.py @@ -95,13 +95,19 @@ def restore_library_path(): return moved -# Where the distributions keep the trust store. One list rather than a guess -# per distribution, in the order curl and Go try them. +# Where the trust store is, which is not one place but is a short list of them: +# every distribution takes its layout from one of four packages rather than +# inventing one, and this is the list Go's crypto/x509 and curl both carry. The +# first line alone answers Debian, Ubuntu, Arch, Gentoo, Fedora and Alpine, +# which was checked rather than assumed; the rest are the ones that do it their +# own way. CA_FILES = ( - "/etc/ssl/certs/ca-certificates.crt", # Debian, Ubuntu, Arch, Gentoo - "/etc/pki/tls/certs/ca-bundle.crt", # Fedora, RHEL - "/etc/ssl/ca-bundle.pem", # openSUSE - "/etc/ssl/cert.pem", # Alpine, and macOS + "/etc/ssl/certs/ca-certificates.crt", # Debian and everything after it + "/etc/pki/tls/certs/ca-bundle.crt", # Fedora, RHEL + "/etc/ssl/ca-bundle.pem", # openSUSE + "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem", # RHEL 7 and CentOS + "/etc/pki/tls/cacert.pem", # OpenELEC + "/etc/ssl/cert.pem", # Alpine, and macOS ) CA_DIRECTORIES = ("/etc/ssl/certs", "/etc/pki/tls/certs")