<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://trustprune.com/feed.xml" rel="self" type="application/atom+xml" /><link href="https://trustprune.com/" rel="alternate" type="text/html" /><updated>2026-12-05T00:13:16+00:00</updated><id>https://trustprune.com/feed.xml</id><title type="html">trustprune</title><subtitle>List, backup, allowlist, and restore CA trust stores on macOS, Linux, and Windows.</subtitle><author><name>trustprune</name></author><entry><title type="html">How to distrust a root CA on Linux (Debian, Ubuntu, RHEL, Arch)</title><link href="https://trustprune.com/2026/12/02/how-to-distrust-a-root-ca-on-linux-debian-ubuntu-rhel-arch.html" rel="alternate" type="text/html" title="How to distrust a root CA on Linux (Debian, Ubuntu, RHEL, Arch)" /><published>2026-12-02T00:00:00+00:00</published><updated>2026-12-02T00:00:00+00:00</updated><id>https://trustprune.com/2026/12/02/how-to-distrust-a-root-ca-on-linux-debian-ubuntu-rhel-arch</id><content type="html" xml:base="https://trustprune.com/2026/12/02/how-to-distrust-a-root-ca-on-linux-debian-ubuntu-rhel-arch.html"><![CDATA[<p>Most Linux how-tos for CA certificates explain how to <em>add</em> a private corporate root. This post is the other job: stop trusting a root the distribution already shipped, after a public distrust or an internal policy.</p>

<p>The system store is only one store. Firefox, Java, certifi, and (on Linux) Chrome’s NSS database are separate. A change here does not update those clients. For a hostname-limited <em>copy</em> of a PEM bundle, see <a href="https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames.html">A limited PEM bundle for a few hostnames</a>. Prefer a temporary file or a container while you are learning; do not point experiments at live <code class="language-plaintext highlighter-rouge">/etc</code> or <code class="language-plaintext highlighter-rouge">/usr</code> CA paths.</p>

<h2 id="the-system-store-is-not-the-only-store">The system store is not the only store</h2>

<p>On Linux, programs that use the operating system’s CA bundle typically read a file generated from a CA directory — <code class="language-plaintext highlighter-rouge">/etc/ssl/certs/ca-certificates.crt</code> on Debian and Ubuntu, or the <code class="language-plaintext highlighter-rouge">tls-ca-bundle.pem</code> that <code class="language-plaintext highlighter-rouge">update-ca-trust</code> writes on RHEL, Fedora, and Arch. Browsers, language runtimes, and some language packages often keep their own lists:</p>

<ul>
  <li>Firefox uses an NSS profile under <code class="language-plaintext highlighter-rouge">~/.mozilla/firefox</code> (or <code class="language-plaintext highlighter-rouge">$XDG_CONFIG_HOME/mozilla/firefox</code>).</li>
  <li>Java uses <code class="language-plaintext highlighter-rouge">cacerts</code> under <code class="language-plaintext highlighter-rouge">JAVA_HOME</code>.</li>
  <li>Python certifi uses its own <code class="language-plaintext highlighter-rouge">cacert.pem</code> (a distro-patched certifi may point at the system bundle).</li>
  <li>Chrome on Linux can use an NSS database at <code class="language-plaintext highlighter-rouge">~/.pki/nssdb</code>.</li>
</ul>

<p><a href="https://trustprune.com/platforms.html">Platforms</a> has discovery paths and support levels. Do not assume a system allowlist has updated every client.</p>

<p>The Debian/Ubuntu mechanism and the RHEL/Arch mechanism are not interchangeable. Do not copy a blocklist path from one family onto the other, and do not hand-edit the generated bundle (<code class="language-plaintext highlighter-rouge">ca-certificates.crt</code> or <code class="language-plaintext highlighter-rouge">tls-ca-bundle.pem</code>). That file is output; the next refresh will rebuild it.</p>

<h2 id="where-each-family-keeps-ca-trust">Where each family keeps CA trust</h2>

<h3 id="debian-ubuntu-and-the-update-ca-certificates-layout">Debian, Ubuntu, and the <code class="language-plaintext highlighter-rouge">update-ca-certificates</code> layout</h3>

<p>Debian and Ubuntu (Alpine and Gentoo use a similar layout) ship CA files under <code class="language-plaintext highlighter-rouge">/usr/share/ca-certificates</code>. Local additions go in <code class="language-plaintext highlighter-rouge">/usr/local/share/ca-certificates</code>. <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code> lists which shipped certificates are enabled. <a href="https://manpages.debian.org/trixie/ca-certificates/update-ca-certificates.8.en.html">update-ca-certificates(8)</a> reads that file, installs the selected certificates into <code class="language-plaintext highlighter-rouge">/etc/ssl/certs</code>, and writes the concatenated bundle <code class="language-plaintext highlighter-rouge">/etc/ssl/certs/ca-certificates.crt</code>.</p>

<p>To disable a CA <em>you</em> did not add — a root the <code class="language-plaintext highlighter-rouge">ca-certificates</code> package shipped — the documented interface is the configuration file, not the generated bundle. Prefix the certificate’s path with <code class="language-plaintext highlighter-rouge">!</code> in <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code>, or run <code class="language-plaintext highlighter-rouge">sudo dpkg-reconfigure ca-certificates</code> and deselect it, then run <code class="language-plaintext highlighter-rouge">sudo update-ca-certificates</code>. Lines beginning with <code class="language-plaintext highlighter-rouge">!</code> deselect and deactivate that CA. <a href="https://sources.debian.org/src/ca-certificates/20250419/debian/README.Debian/">README.Debian</a> describes the same <code class="language-plaintext highlighter-rouge">dpkg-reconfigure</code> flow.</p>

<p>A package update can put a shipped certificate back into play if configuration is reset or a new file is enabled. There is no guarantee a distrust survives the next <code class="language-plaintext highlighter-rouge">ca-certificates</code> upgrade.</p>

<h3 id="fedora-rhel-and-rocky-update-ca-trust-sourceblocklist">Fedora, RHEL, and Rocky (<code class="language-plaintext highlighter-rouge">update-ca-trust</code>, <code class="language-plaintext highlighter-rouge">source/blocklist</code>)</h3>

<p>RHEL, Fedora, CentOS, and Rocky use the p11-kit system-wide trust store. <a href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks">Red Hat’s RHEL 9 documentation</a> places trust anchors in <code class="language-plaintext highlighter-rouge">/etc/pki/ca-trust/source/anchors/</code> (or the lower-priority <code class="language-plaintext highlighter-rouge">/usr/share/pki/ca-trust-source/anchors/</code>) and distrusted certificates in <code class="language-plaintext highlighter-rouge">/etc/pki/ca-trust/source/blocklist/</code> (or <code class="language-plaintext highlighter-rouge">/usr/share/pki/ca-trust-source/blocklist/</code>). Settings under <code class="language-plaintext highlighter-rouge">/etc/pki/ca-trust/</code> take priority over <code class="language-plaintext highlighter-rouge">/usr/share/pki/ca-trust-source/</code>. After a change, run <code class="language-plaintext highlighter-rouge">update-ca-trust</code> (or <code class="language-plaintext highlighter-rouge">update-ca-trust extract</code>). The extracted TLS bundle is <code class="language-plaintext highlighter-rouge">/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem</code>.</p>

<p>The same document describes the <code class="language-plaintext highlighter-rouge">trust</code> command from p11-kit: <code class="language-plaintext highlighter-rouge">trust list</code> lists anchors and certificates; <code class="language-plaintext highlighter-rouge">trust anchor /path/to/certificate.crt</code> stores an anchor; <code class="language-plaintext highlighter-rouge">trust anchor --remove</code> removes one by path or PKCS#11 id. Putting a PEM in the <em>blocklist</em> directory is the layout for distrusting a certificate; <code class="language-plaintext highlighter-rouge">trust anchor --remove</code> is the documented way to remove an anchor you added. They are not the same operation.</p>

<p>Do not edit files under <code class="language-plaintext highlighter-rouge">extracted/</code>. <code class="language-plaintext highlighter-rouge">update-ca-trust</code> regenerates them.</p>

<h3 id="arch-update-ca-trust-etcca-certificatestrust-sourceblocklist">Arch (<code class="language-plaintext highlighter-rouge">update-ca-trust</code>, <code class="language-plaintext highlighter-rouge">/etc/ca-certificates/trust-source/blocklist</code>)</h3>

<p>Arch uses the same p11-kit model with different paths. <a href="https://man.archlinux.org/man/update-ca-trust.8">update-ca-trust(8)</a> and the <a href="https://wiki.archlinux.org/title/Transport_Layer_Security">ArchWiki TLS page</a> put high-priority sources under <code class="language-plaintext highlighter-rouge">/etc/ca-certificates/trust-source/</code>: anchors in <code class="language-plaintext highlighter-rouge">anchors/</code>, distrust in <code class="language-plaintext highlighter-rouge">blocklist/</code>. Lower-priority packaged sources live under <code class="language-plaintext highlighter-rouge">/usr/share/ca-certificates/trust-source/</code>. The extracted bundle is <code class="language-plaintext highlighter-rouge">/etc/ca-certificates/extracted/tls-ca-bundle.pem</code>. After changing a trust-source directory, run <code class="language-plaintext highlighter-rouge">update-ca-trust</code> or <code class="language-plaintext highlighter-rouge">update-ca-trust extract</code>. Certificates in the system <code class="language-plaintext highlighter-rouge">blocklist/</code> directory are treated as distrusted for all purposes.</p>

<p>The <code class="language-plaintext highlighter-rouge">trust</code> utility is available here too (<code class="language-plaintext highlighter-rouge">trust list</code>, <code class="language-plaintext highlighter-rouge">trust anchor</code>). The Debian <code class="language-plaintext highlighter-rouge">update-ca-certificates</code> command and <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code> are not this layout.</p>

<p>trustprune picks the first CA directory whose bundle file exists, in this order: Fedora/RHEL/Rocky, then Arch, then Debian/Ubuntu/Alpine/Gentoo. Fedora and Arch often also ship <code class="language-plaintext highlighter-rouge">/etc/ssl/certs/ca-certificates.crt</code> as a compatibility symlink, which is why the unique bundle paths are checked first. Details are in <a href="https://trustprune.com/platforms.html">Platforms</a>.</p>

<h2 id="audit-the-current-store">Audit the current store</h2>

<p>Install current trustprune (<code class="language-plaintext highlighter-rouge">v1.0.0</code>) if you want one CLI for this; see <a href="https://trustprune.com/install.html">Install</a>. <a href="https://trustprune.com/basics.html">Basics</a> and <a href="https://trustprune.com/usage.html">Usage</a> cover the commands. Listing does not change the store.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune apps
trustprune list <span class="nt">--count</span>
trustprune list
</code></pre></div></div>

<p>On p11-kit systems you can also run <code class="language-plaintext highlighter-rouge">trust list</code>. On Debian and Ubuntu, <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code> is the enabled-set. Neither is a complete view of Firefox, Java, or certifi.</p>

<p>On Windows, the platform store is list-only: <code class="language-plaintext highlighter-rouge">allowlist</code> and <code class="language-plaintext highlighter-rouge">backup</code> do not write to it. That does not apply to the Linux platform store, which supports those operations.</p>

<h2 id="distrust-a-root-without-hand-editing-the-bundle">Distrust a root without hand-editing the bundle</h2>

<h3 id="backup-first">Backup first</h3>

<p>Allowlisting refuses to write if the store has no backup (<a href="https://trustprune.com/backup-restore.html">Backup and restore</a>). Linux platform backups are a mirror of the live CA <em>directory</em> under <code class="language-plaintext highlighter-rouge">~/.trustprune/linux/&lt;timestamp&gt;/</code>.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune backup <span class="nt">--dry-run</span>
trustprune backup
</code></pre></div></div>

<p>Refresh tools (<code class="language-plaintext highlighter-rouge">update-ca-certificates</code> or <code class="language-plaintext highlighter-rouge">update-ca-trust</code>) and copies into root-owned paths escalate with <code class="language-plaintext highlighter-rouge">sudo</code> when <code class="language-plaintext highlighter-rouge">sudo</code> is on <code class="language-plaintext highlighter-rouge">PATH</code>, otherwise <code class="language-plaintext highlighter-rouge">su</code>. A process that is already root runs the command directly. Exact behavior is on <a href="https://trustprune.com/platforms.html">Platforms</a>.</p>

<h3 id="--dry-run-then-allowlist"><code class="language-plaintext highlighter-rouge">--dry-run</code>, then allowlist</h3>

<p>An allowlist is a list of SHA-256 fingerprints to <em>keep</em> (<a href="https://trustprune.com/allowlists.html">Allowlists</a>). Preview, then apply:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune allowlist <span class="nt">--file</span> allowlist.yaml <span class="nt">--dry-run</span>
trustprune allowlist <span class="nt">--file</span> allowlist.yaml
</code></pre></div></div>

<p>On Fedora, RHEL, Rocky, and Arch, allowlist writes distrust PEM overlays into the distro <code class="language-plaintext highlighter-rouge">blocklist</code> directory and runs <code class="language-plaintext highlighter-rouge">update-ca-trust</code>, so the extracted bundle is rebuilt from trust-source. On Debian and Ubuntu, it updates files under the CA directory and runs <code class="language-plaintext highlighter-rouge">update-ca-certificates</code>. That is not a substitute for editing <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code> by hand; it is the tool’s Debian-style remove path. A later package upgrade can restore vendor files. Do not assume the change survives the next OS or <code class="language-plaintext highlighter-rouge">ca-certificates</code> update.</p>

<p><code class="language-plaintext highlighter-rouge">--dry-run</code> prints the plan and does not write. There is no complete coverage of every CA that might appear in some other store on the machine.</p>

<h2 id="verify">Verify</h2>

<p>A changed <code class="language-plaintext highlighter-rouge">--count</code> or a successful <code class="language-plaintext highlighter-rouge">connect</code> is not proof that the intended CA was distrusted. If the allowlist kept the target root and removed a different one, the count can still drop and a site can still connect. Record the target’s SHA-256 before you apply the allowlist, then confirm it is absent from the resulting store:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune list <span class="nt">-v</span>
trustprune list <span class="nt">--count</span>
trustprune connect https://example.com
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">-v</code> / <code class="language-plaintext highlighter-rouge">--verbose</code> prints the full fingerprint in the table. <code class="language-plaintext highlighter-rouge">connect</code> uses the platform store unless you pass <code class="language-plaintext highlighter-rouge">--app</code>; it only tells you whether a given hostname still works.</p>

<h2 id="roll-back">Roll back</h2>

<p>Use restore only when you want the previous store back. Linux restore stages the backup into a sibling temporary directory, swaps it into place, and runs the distro refresh command. If refresh fails, it puts the previous tree back. The step-by-step swap is in <a href="https://trustprune.com/backup-restore.html">Backup and restore</a>.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune restore <span class="nt">--dry-run</span>
trustprune restore
</code></pre></div></div>

<p>A Linux platform backup is a mirror of the live CA <em>directory</em> (<code class="language-plaintext highlighter-rouge">/usr/share/ca-certificates</code> on Debian and Ubuntu, <code class="language-plaintext highlighter-rouge">/etc/pki/ca-trust/source</code> on Fedora, RHEL, and Rocky, or <code class="language-plaintext highlighter-rouge">/etc/ca-certificates/trust-source</code> on Arch). It does not include <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code>. If you disabled a CA with a <code class="language-plaintext highlighter-rouge">!</code> prefix in that file or with <code class="language-plaintext highlighter-rouge">dpkg-reconfigure ca-certificates</code>, <code class="language-plaintext highlighter-rouge">trustprune restore</code> does not undo that change. To re-enable the CA, remove the <code class="language-plaintext highlighter-rouge">!</code> prefix from the certificate’s line in <code class="language-plaintext highlighter-rouge">/etc/ca-certificates.conf</code>, or reselect it with <code class="language-plaintext highlighter-rouge">sudo dpkg-reconfigure ca-certificates</code>, then run <code class="language-plaintext highlighter-rouge">sudo update-ca-certificates</code>.</p>

<h2 id="what-this-does-not-change">What this does not change</h2>

<p>A system-store allowlist does not update Firefox, Chrome’s Linux NSS database, Java <code class="language-plaintext highlighter-rouge">cacerts</code>, or Python certifi. Use <code class="language-plaintext highlighter-rouge">--app firefox</code>, <code class="language-plaintext highlighter-rouge">--app chrome</code>, <code class="language-plaintext highlighter-rouge">--app java</code>, or <code class="language-plaintext highlighter-rouge">--app certifi</code> for those stores when they are supported. <a href="https://trustprune.com/platforms.html">Platforms</a> is the support table.</p>

<p>The same split exists on macOS: Safari follows Apple’s frameworks and Keychain, while git and curl read <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>. See <a href="https://trustprune.com/2026/12/02/why-safari-blocked-that-ca-but-git-and-curl-still-trust-it.html">Why Safari blocked that CA but git and curl still trust it</a>.</p>

<h2 id="experiment-on-a-copy-or-in-a-container-not-on-etc">Experiment on a copy or in a container, not on <code class="language-plaintext highlighter-rouge">/etc</code></h2>

<p>To practice on a PEM <em>copy</em> rather than the live system store, use <code class="language-plaintext highlighter-rouge">--app openssl --bundle</code> as in the <a href="https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames.html">11 November post</a>. Pointing <code class="language-plaintext highlighter-rouge">allowlist</code> at the real CA directory is a privileged change. Back up first, and keep a known-good backup until the machine still reaches the sites and tools you need.</p>

<p>Changing CA trust stores can break TLS, cut off access and reduce security, so back up first and proceed at your own risk. trustprune is provided as is, with no warranty, under the Apache License 2.0, and its authors and contributors accept no liability.</p>]]></content><author><name>trustprune</name></author><summary type="html"><![CDATA[Distrust a bundled root CA on Debian, Ubuntu, RHEL, or Arch without editing the generated bundle: the right paths, update-ca-certificates versus update-ca-trust, then backup, preview, verify, and restore.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://trustprune.com/images/brand/og-card.png" /><media:content medium="image" url="https://trustprune.com/images/brand/og-card.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Why Safari blocked that CA but git and curl still trust it</title><link href="https://trustprune.com/2026/12/02/why-safari-blocked-that-ca-but-git-and-curl-still-trust-it.html" rel="alternate" type="text/html" title="Why Safari blocked that CA but git and curl still trust it" /><published>2026-12-02T00:00:00+00:00</published><updated>2026-12-02T00:00:00+00:00</updated><id>https://trustprune.com/2026/12/02/why-safari-blocked-that-ca-but-git-and-curl-still-trust-it</id><content type="html" xml:base="https://trustprune.com/2026/12/02/why-safari-blocked-that-ca-but-git-and-curl-still-trust-it.html"><![CDATA[<p>A CA distrust or compromise can look inconsistent on a Mac. Safari refuses a site, and then <code class="language-plaintext highlighter-rouge">/usr/bin/git</code> or <code class="language-plaintext highlighter-rouge">/usr/bin/curl</code> still connects. That is usually not a bug in either program. macOS keeps more than one trust store, and they are not updated together.</p>

<p>This is a map of those stores, with the October 2026 eMudhra incident as the example. It is not a rewrite of Apple’s hand-edit for <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>. For that interim recipe and why it is a fragile operations practice, see the <a href="https://trustprune.com/2026/10/28/apple-pem-hand-edit-emudhra.html">28 October post</a>.</p>

<h2 id="one-machine-several-trust-stores">One machine, several trust stores</h2>

<h3 id="safari-and-apps-that-use-apples-security-frameworks">Safari and apps that use Apple’s security frameworks</h3>

<p>Safari, Mail, and other software that uses Apple’s networking and security frameworks consult Apple’s system roots and trust settings — the Keychain world, including the SIP-protected system root keychain at <code class="language-plaintext highlighter-rouge">/System/Library/Keychains/SystemRootCertificates.keychain</code>. Apple can push a certificate block in configuration data without a macOS point release. That is the path that blocked the compromised eMudhra intermediates in the browser.</p>

<p>trustprune’s Darwin platform store can list those Keychain-backed roots. It does not rewrite the SIP-protected system roots. Platform operations that it does support (including login-keychain backup and restore) are documented in <a href="https://trustprune.com/platforms.html">Platforms</a> and <a href="https://trustprune.com/backup-restore.html">Backup and restore</a>.</p>

<h3 id="command-line-tools-that-read-etcsslcertpem">Command-line tools that read <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code></h3>

<p><code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code> is a PEM bundle on disk. <a href="https://support.apple.com/en-us/149555">Apple Support</a> states that some command-line tools included with macOS or the Xcode Command Line Tools — including curl, git, python3, ruby, perl, and openssl — check certificates against that file. For certificates that chain to a root in the file, those tools do not consult Apple’s block or check whether the certificate has been revoked.</p>

<p>A Homebrew or otherwise separately packaged <code class="language-plaintext highlighter-rouge">curl</code> or <code class="language-plaintext highlighter-rouge">openssl</code> may use a different bundle. The split above is about the tools Apple ships.</p>

<p>In trustprune this file is a separate store: <code class="language-plaintext highlighter-rouge">--app ssl</code>. It is not the Darwin platform store, and it is not available as a store on Linux or Windows.</p>

<h3 id="app-stores-that-ship-their-own-roots">App stores that ship their own roots</h3>

<p>Java (<code class="language-plaintext highlighter-rouge">cacerts</code>), Python certifi (<code class="language-plaintext highlighter-rouge">cacert.pem</code>), and Firefox (an NSS profile) keep their own CA lists. They do not automatically follow either Apple’s Keychain block or a change to <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>. On macOS and Windows, <code class="language-plaintext highlighter-rouge">--app chrome</code> wraps the platform store. Chrome’s default public roots come from the <a href="https://chromium.googlesource.com/chromium/src/+/main/net/data/ssl/chrome_root_store/faq.md">Chrome Root Store</a>, and Chrome can also apply local trust decisions, so a platform-store listing is not Chrome’s full trust inventory. On Linux, Chrome can use an NSS database at <code class="language-plaintext highlighter-rouge">~/.pki/nssdb</code>. See <a href="https://trustprune.com/platforms.html">Platforms</a> for discovery paths and which operations each app supports. Not every application on the machine is a supported store.</p>

<h2 id="what-happened-in-the-emudhra-incident">What happened in the eMudhra incident</h2>

<p>In October 2026, the private keys of eight eMudhra intermediate CAs were compromised. Six of them could issue TLS certificates; each of those six had two certificates (twelve in total): one chaining to <strong>emSign ECC Root CA - G3</strong>, and one cross-signed by Sectigo and chaining to <strong>AAA Certificate Services</strong>. Apple’s account is in <a href="https://support.apple.com/en-us/149555">About the compromised eMudhra intermediate CAs</a> (updated 9 November 2026). A short incident list, including this one, is on the <a href="https://trustprune.com/why.html">Why</a> page.</p>

<h3 id="apples-block-versus-the-pem-file">Apple’s block versus the PEM file</h3>

<p>Apple blocked those twelve certificates and emSign ECC Root CA - G3 in Safari, Mail, and apps that use Apple’s frameworks. That block is what most people saw first.</p>

<p>The same document is explicit about the CLI gap:</p>

<blockquote>
  <p>On Mac, some command-line tools included with macOS or the Xcode Command Line Tools (including curl, git, python3, ruby, perl, and openssl) check certificates against /etc/ssl/cert.pem. For certificates that chain to a root CA certificate in this file, these tools don’t check Apple’s block or whether the certificate has been revoked.</p>
</blockquote>

<p>That is why git and curl could still accept a chain after Safari had refused it.</p>

<h3 id="later-point-releases-and-why-the-vendor-file-can-still-change">Later point releases, and why the vendor file can still change</h3>

<p>Starting in macOS 27.2.1 — and in macOS 26.7.3 and 15.8.3 for machines on those releases — Apple also blocks those twelve certificates in the bundled command-line tools, and it removes the two roots those chains use from <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>, along with three other eMudhra roots. If you can update, that is the path Apple recommends.</p>

<p>Those point releases are not a reason to skip the other stores, and they are not a promise that <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code> will never be replaced again. Apple still tells people who hand-edit the file to re-check it after each software update and to repeat the removal if a root they stripped has returned. After you <em>do</em> reach 27.2.1, 26.7.3, or 15.8.3, Apple says not to restore a <code class="language-plaintext highlighter-rouge">cert.pem</code> backup made before the update. Public reporting dated 28 October 2026, updated 10 November, also recorded that macOS 27.2 restored a hand-edited <code class="language-plaintext highlighter-rouge">cert.pem</code> (<a href="https://emudhra.we-have-a-problem.com/apple.html">we-have-a-problem.com</a>). The durable lesson is the same: a prune of that file does not automatically survive the next OS update.</p>

<h2 id="audit-first--list-the-stores-on-the-machine">Audit first — list the stores on the machine</h2>

<p>Install current trustprune (<code class="language-plaintext highlighter-rouge">v1.0.0</code>) if you want one CLI for this inventory; see <a href="https://trustprune.com/install.html">Install</a>. Listing does not change a store.</p>

<p>See which stores the tool finds:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune apps
trustprune apps <span class="nt">--format</span> json
</code></pre></div></div>

<p>Count or list certificates. <code class="language-plaintext highlighter-rouge">--app ssl</code> is the CLI PEM bundle; omit <code class="language-plaintext highlighter-rouge">--app</code> for the platform store; other apps are explicit:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune list <span class="nt">--count</span>
trustprune list <span class="nt">--app</span> ssl <span class="nt">--count</span>
trustprune list <span class="nt">--app</span> ssl
trustprune list <span class="nt">--app</span> java <span class="nt">--count</span>
trustprune list <span class="nt">--app</span> firefox <span class="nt">--count</span>
trustprune list <span class="nt">--app</span> chrome <span class="nt">--count</span>
trustprune list <span class="nt">--app</span> certifi <span class="nt">--count</span>
</code></pre></div></div>

<p>On macOS and Windows, <code class="language-plaintext highlighter-rouge">list --app chrome</code> wraps the platform store; it is not an inventory of the Chrome Root Store.</p>

<p>On Windows, the platform store is list-only: <code class="language-plaintext highlighter-rouge">allowlist</code>, <code class="language-plaintext highlighter-rouge">backup</code>, add, and restore are no-ops there. Java can still be backed up and allowlisted on Windows when a usable <code class="language-plaintext highlighter-rouge">JAVA_HOME</code> is set.</p>

<p>Optional native checks, if you want to corroborate a store without trustprune:</p>

<ul>
  <li>Keychain: <code class="language-plaintext highlighter-rouge">security find-certificate -a -c "emSign" /System/Library/Keychains/SystemRootCertificates.keychain</code></li>
  <li>The PEM bundle: <code class="language-plaintext highlighter-rouge">grep -F "emSign ECC Root CA - G3" /etc/ssl/cert.pem</code></li>
  <li>A custom bundle: <code class="language-plaintext highlighter-rouge">echo "$SSL_CERT_FILE"; git config --get http.sslCAInfo</code></li>
</ul>

<p>Those commands only tell you whether a name or path is present. They are not a complete audit of every CA on the machine.</p>

<h2 id="confirm-a-host-against-a-chosen-store">Confirm a host against a chosen store</h2>

<p><code class="language-plaintext highlighter-rouge">trustprune connect</code> attempts an HTTPS handshake using the platform store or an app store (<a href="https://trustprune.com/basics.html">Basics</a>, <a href="https://trustprune.com/usage.html">Usage</a>):</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune connect https://example.com
trustprune connect <span class="nt">--app</span> ssl https://example.com
trustprune connect <span class="nt">--app</span> java https://example.com
</code></pre></div></div>

<p>A bare host is treated as <code class="language-plaintext highlighter-rouge">https://</code>. This checks the store you selected, not every client on the system.</p>

<h2 id="if-you-need-to-change-a-store">If you need to change a store</h2>

<p>Backup, preview, apply, and restore are the same workflow on every store that supports those operations (<a href="https://trustprune.com/allowlists.html">Allowlists</a>, <a href="https://trustprune.com/backup-restore.html">Backup and restore</a>):</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune backup <span class="nt">--app</span> ssl <span class="nt">--dry-run</span>
trustprune backup <span class="nt">--app</span> ssl
trustprune allowlist <span class="nt">--app</span> ssl <span class="nt">--file</span> allowlist.yaml <span class="nt">--dry-run</span>
trustprune allowlist <span class="nt">--app</span> ssl <span class="nt">--file</span> allowlist.yaml
trustprune list <span class="nt">--app</span> ssl <span class="nt">--count</span>
trustprune connect <span class="nt">--app</span> ssl https://example.com
trustprune restore <span class="nt">--app</span> ssl <span class="nt">--dry-run</span>
trustprune restore <span class="nt">--app</span> ssl
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">allowlist</code> refuses to write if that store has no backup. Darwin <code class="language-plaintext highlighter-rouge">--app ssl</code> backups are copies of <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code> under <code class="language-plaintext highlighter-rouge">~/Library/trustprune/ssl/&lt;timestamp&gt;/cert.pem</code>. A structured backup with a dry-run plan is easier to review and roll back than a single <code class="language-plaintext highlighter-rouge">cert.pem.orig</code> plus a one-off <code class="language-plaintext highlighter-rouge">awk</code>.</p>

<p>Limits to keep in mind:</p>

<ul>
  <li>macOS system roots are SIP-protected and are not rewritten. <code class="language-plaintext highlighter-rouge">--app ssl</code> only manages <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>.</li>
  <li>The Darwin platform store is partial. The Windows platform store is list-only; do not expect <code class="language-plaintext highlighter-rouge">allowlist</code> or <code class="language-plaintext highlighter-rouge">backup</code> to change it.</li>
  <li>Not every app is a supported store. A change in one store does not update the others.</li>
  <li>An OS update can put vendor roots back into <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>. Re-list after updates.</li>
</ul>

<h2 id="linux-briefly">Linux, briefly</h2>

<p>Linux has the same kind of split: a system CA directory and generated bundle (<code class="language-plaintext highlighter-rouge">update-ca-certificates</code> on Debian and Ubuntu, <code class="language-plaintext highlighter-rouge">update-ca-trust</code> on RHEL, Fedora, and Arch) plus separate stores for Firefox, Java, certifi, and, on Linux, Chrome’s NSS database when it exists. The system bundle and those app stores are not kept in sync. <a href="https://trustprune.com/2026/12/02/how-to-distrust-a-root-ca-on-linux-debian-ubuntu-rhel-arch.html">How to distrust a root CA on Linux (Debian, Ubuntu, RHEL, Arch)</a> is the walkthrough for the system store.</p>

<h2 id="further-reading">Further reading</h2>

<ul>
  <li><a href="https://trustprune.com/2026/10/28/apple-pem-hand-edit-emudhra.html">Apple told Mac admins to hand-edit a PEM file. That is a symptom.</a></li>
  <li><a href="https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames.html">A limited PEM bundle for a few hostnames</a> — work on a PEM copy when you do not need to change the system store</li>
  <li><a href="https://trustprune.com/platforms.html">Platforms</a></li>
  <li><a href="https://trustprune.com/backup-restore.html">Backup and restore</a>, including Darwin <code class="language-plaintext highlighter-rouge">--app ssl</code></li>
  <li><a href="https://trustprune.com/why.html">Why</a></li>
  <li><a href="https://support.apple.com/en-us/149555">Apple Support HT149555</a></li>
</ul>

<p>Changing CA trust stores can break TLS, cut off access and reduce security, so back up first and proceed at your own risk. trustprune is provided as is, with no warranty, under the Apache License 2.0, and its authors and contributors accept no liability.</p>]]></content><author><name>trustprune</name></author><summary type="html"><![CDATA[A store-by-store map for Mac admins: Safari uses Apple's frameworks and Keychain, while git and curl read /etc/ssl/cert.pem. The 2026 eMudhra compromise is the example, not a one-off awk script.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://trustprune.com/images/brand/og-card.png" /><media:content medium="image" url="https://trustprune.com/images/brand/og-card.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">A limited PEM bundle for a few hostnames</title><link href="https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames.html" rel="alternate" type="text/html" title="A limited PEM bundle for a few hostnames" /><published>2026-11-11T00:00:00+00:00</published><updated>2026-11-11T00:00:00+00:00</updated><id>https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames</id><content type="html" xml:base="https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames.html"><![CDATA[<p>Default CA trust stores are large. On this machine, the OpenSSL bundle at <code class="language-plaintext highlighter-rouge">/etc/ssl/certs/ca-certificates.crt</code> holds 148 certificates and occupies 222,073 bytes. A small server that only talks to a few hostnames does not need all of them.</p>

<p><code class="language-plaintext highlighter-rouge">trustprune gen-allowlist --hosts</code> builds an allowlist from those hostnames. <code class="language-plaintext highlighter-rouge">trustprune allowlist --app openssl --bundle</code> applies it to a PEM file. The walkthrough below uses a <em>copy</em> of the system bundle so the live store is left alone.</p>

<h2 id="build-the-allowlist">Build the allowlist</h2>

<p>Copy the bundle, then see how many CAs it has:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nb">cp</span> /etc/ssl/certs/ca-certificates.crt /tmp/service-ca-bundle.pem
trustprune list <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem <span class="nt">--count</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>148
</code></pre></div></div>

<p>Suppose the service only needs <code class="language-plaintext highlighter-rouge">example.com</code>, <code class="language-plaintext highlighter-rouge">pypi.org</code>, and <code class="language-plaintext highlighter-rouge">github.com</code>. <code class="language-plaintext highlighter-rouge">--no-presets</code> skips the default platform hosts (apt repos on Linux, Apple or Windows update hosts on those OSes) so the allowlist is just those three:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune gen-allowlist <span class="nt">--out</span> allowlist.yaml <span class="nt">--hosts</span> example.com,pypi.org,github.com <span class="nt">--no-presets</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>CA                                            Fingerprint      Count Example DNSNames
SSL.com TLS ECC Root CA 2022                  c32ffd9f46f936d1 1     example.com
GlobalSign                                    cbb522d7b7f127ad 1     pypi.org
Sectigo Public Server Authentication Root E46 c90f26f0fb1b4018 1     github.com
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">--out</code> is required. Without it, <code class="language-plaintext highlighter-rouge">gen-allowlist</code> prints <code class="language-plaintext highlighter-rouge">required flag --out not set</code> and exits 2. The file is a list of SHA-256 fingerprints, not hostnames:</p>

<div class="language-yaml highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="na">fingerprints</span><span class="pi">:</span>
    <span class="pi">-</span> <span class="s">c32ffd9f46f936d16c3673990959434b9ad60aafbb9e7cf33654f144cc1ba143</span>
    <span class="pi">-</span> <span class="s">cbb522d7b7f127ad6a0113865bdf1cd4102e7d0759af635a7cf4720dc963c53b</span>
    <span class="pi">-</span> <span class="s">c90f26f0fb1b4018b22227519b5ca2b53e2ca5b3be5cf18efe1bef47380c5383</span>
</code></pre></div></div>

<p>Those CAs were observed on 11 November 2026. A host can rotate to a different root. Re-generate the allowlist periodically, and again if a needed site starts failing verification. Before applying the new allowlist, restore the original bundle: allowlisting only keeps CAs already in the file, so it cannot add a root that was removed. If the original bundle does not contain the new root, obtain a suitable trusted bundle first, then regenerate, apply, and verify the host.</p>

<h2 id="apply-it-to-the-pem-copy">Apply it to the PEM copy</h2>

<p><code class="language-plaintext highlighter-rouge">allowlist</code> will not write without a backup for that store. Work on the copy, and preview first:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune backup <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem <span class="nt">--dry-run</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dry-run: would backup openssl at /tmp/service-ca-bundle.pem
  copy /tmp/service-ca-bundle.pem into $HOME/.trustprune/openssl/&lt;timestamp&gt;/ca-bundle.pem
  record the bundle path in source
dry-run: no changes made
</code></pre></div></div>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune backup <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Backup completed successfully: $HOME/.trustprune/openssl/1794450129
</code></pre></div></div>

<p>Without that backup, allowlisting fails immediately:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>ERROR: no backup for openssl in ~/.trustprune/openssl; run: trustprune backup --app openssl
</code></pre></div></div>

<p>Preview the removals, then apply:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune allowlist <span class="nt">--file</span> allowlist.yaml <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem <span class="nt">--dry-run</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dry-run: would remove certificates from openssl at /tmp/service-ca-bundle.pem
  remove ACCVRAIZ1 (SHA256 9a6ec012e1a7da9dbe34194d478ad7c0db1822fb071df12981496ed104384113)
  remove FNMT-RCM, AC RAIZ FNMT-RCM (SHA256 ebc5570c29018c4d67b1aa127baf12f703b4611ebc17b7dab5573894179b93fa)
  ...
dry-run: no changes made
</code></pre></div></div>

<p>The dry-run lists every certificate that would be removed. That is a long list on a default bundle; only the first rows are shown here.</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune allowlist <span class="nt">--file</span> allowlist.yaml <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem
trustprune list <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem <span class="nt">--count</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Allowlist completed successfully
3
</code></pre></div></div>

<p>Current <code class="language-plaintext highlighter-rouge">allowlist</code> also prints <code class="language-plaintext highlighter-rouge">N removed, M kept</code> after the success line. The <code class="language-plaintext highlighter-rouge">3</code> above is from <code class="language-plaintext highlighter-rouge">list --count</code>.</p>

<p>The copy is now 2,897 bytes. Chromium’s certificate blocklist is applied as well, and cannot be turned off.</p>

<h2 id="check-the-bundle-then-restore">Check the bundle, then restore</h2>

<p><code class="language-plaintext highlighter-rouge">trustprune connect</code> has no <code class="language-plaintext highlighter-rouge">--bundle</code> flag. Point the process that will use the PEM at the file. With curl 8.14.1 linked against OpenSSL, <code class="language-plaintext highlighter-rouge">--cacert</code> alone still loaded the default CA store, so other sites kept verifying. Passing an empty <code class="language-plaintext highlighter-rouge">--capath</code> directory isolates the bundle:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">empty_capath</span><span class="o">=</span><span class="si">$(</span><span class="nb">mktemp</span> <span class="nt">-d</span><span class="si">)</span>
curl <span class="nt">--cacert</span> /tmp/service-ca-bundle.pem <span class="nt">--capath</span> <span class="s2">"</span><span class="nv">$empty_capath</span><span class="s2">"</span> <span class="nt">-sS</span> <span class="nt">-o</span> /dev/null <span class="nt">--max-time</span> 20 <span class="nt">-w</span> <span class="s1">'%{http_code}\n'</span> https://example.com/
curl <span class="nt">--cacert</span> /tmp/service-ca-bundle.pem <span class="nt">--capath</span> <span class="s2">"</span><span class="nv">$empty_capath</span><span class="s2">"</span> <span class="nt">-sS</span> <span class="nt">-o</span> /dev/null <span class="nt">--max-time</span> 20 <span class="nt">-w</span> <span class="s1">'%{http_code}\n'</span> https://www.wikipedia.org/
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">https://example.com/</code> returned <code class="language-plaintext highlighter-rouge">200</code>. <code class="language-plaintext highlighter-rouge">https://www.wikipedia.org/</code> failed with curl exit 60:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>curl: (60) SSL certificate problem: unable to get local issuer certificate
</code></pre></div></div>

<p><code class="language-plaintext highlighter-rouge">openssl s_client -CAfile /tmp/service-ca-bundle.pem -verify_return_error</code> agreed: example.com verified; wikipedia.org chained to ISRG Root X2, which is not in the three-CA bundle.</p>

<p>The allowlist keeps CAs, not hostnames. Any other site that chains to one of those three roots will still verify. Sites that need a different root will fail. That is expected, and it is why a host rotating CAs means you restore the original bundle, re-generate, and apply again.</p>

<p>To put the copy back:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune restore <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem <span class="nt">--dry-run</span>
trustprune restore <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem
trustprune list <span class="nt">--app</span> openssl <span class="nt">--bundle</span> /tmp/service-ca-bundle.pem <span class="nt">--count</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>dry-run: would restore openssl at /tmp/service-ca-bundle.pem
  source $HOME/.trustprune/openssl/1794450129/ca-bundle.pem
  stage into /tmp/service-ca-bundle.pem.restore-tmp then swap over /tmp/service-ca-bundle.pem
dry-run: no changes made
Restore completed successfully: /tmp/service-ca-bundle.pem
148
</code></pre></div></div>

<h2 id="when-to-keep-platform-presets">When to keep platform presets</h2>

<p>Without <code class="language-plaintext highlighter-rouge">--no-presets</code>, generation also includes the default platform preset for this OS: apt HTTPS indexes on Linux, Apple service and software-update hosts on macOS, Windows update and download hosts on Windows. Pass <code class="language-plaintext highlighter-rouge">--presets linux</code> (or <code class="language-plaintext highlighter-rouge">darwin</code> / <code class="language-plaintext highlighter-rouge">windows</code>) to target another OS, for example when you build a Linux-server allowlist on a Mac.</p>

<p>The same three hosts plus <code class="language-plaintext highlighter-rouge">--presets linux</code> produced five CAs, not three. The extras were ISRG Root X1 (for hosts such as <code class="language-plaintext highlighter-rouge">deb.debian.org</code>, <code class="language-plaintext highlighter-rouge">security.debian.org</code>, and <code class="language-plaintext highlighter-rouge">download.rockylinux.org</code>) and DigiCert Global Root G3 (<code class="language-plaintext highlighter-rouge">download.fedoraproject.org</code>). Keep that preset if the machine still needs to talk to those package indexes.</p>

<p>There is no time-server preset. <code class="language-plaintext highlighter-rouge">gen-allowlist</code> only dials HTTPS, and the usual OS time servers speak NTP on UDP/123. Asking for one is a usage error:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune gen-allowlist <span class="nt">--out</span> allowlist.yaml <span class="nt">--presets</span> <span class="nb">time</span>
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>unknown preset "time"
run 'trustprune gen-allowlist --help' for usage
</code></pre></div></div>

<p>That command exits 2. Adding NTP hostnames would not discover a CA.</p>

<h2 id="caveats">Caveats</h2>

<p>Generation verifies chains against the system trust store, not against the PEM you may later allowlist. CAs that exist only in that target bundle are not discovered.</p>

<p>The allowlist is a set of CA fingerprints, so it is broader than “exactly these hostnames.” Restore the original bundle, re-generate periodically and whenever a needed host changes CA, then apply and verify.</p>

<p>Always back up first. Prefer a copy of the bundle, <code class="language-plaintext highlighter-rouge">--dry-run</code>, and <code class="language-plaintext highlighter-rouge">restore</code> if something breaks.</p>

<p>See <a href="/allowlists">Allowlists</a> and <a href="/usage">Usage</a> for the full flag list.</p>

<h2 id="further-reading">Further reading</h2>

<ul>
  <li><a href="https://trustprune.com/2026/10/28/apple-pem-hand-edit-emudhra.html">Apple told Mac admins to hand-edit a PEM file. That is a symptom.</a> — why editing the system PEM under pressure is a fragile operations practice</li>
  <li><a href="https://trustprune.com/2026/12/02/how-to-distrust-a-root-ca-on-linux-debian-ubuntu-rhel-arch.html">How to distrust a root CA on Linux (Debian, Ubuntu, RHEL, Arch)</a> — when you need to change the system store rather than a copy</li>
  <li><a href="https://trustprune.com/2026/12/02/why-safari-blocked-that-ca-but-git-and-curl-still-trust-it.html">Why Safari blocked that CA but git and curl still trust it</a> — the same split between platform and CLI stores on macOS</li>
</ul>

<p>Changing CA trust stores can break TLS, cut off access and reduce security, so back up first and proceed at your own risk. trustprune is provided as is, with no warranty, under the Apache License 2.0, and its authors and contributors accept no liability.</p>]]></content><author><name>trustprune</name></author><summary type="html"><![CDATA[Build a hostname-limited PEM bundle for a few sites instead of editing the system CA store, then preview, back up, and restore the copy.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://trustprune.com/images/brand/og-card.png" /><media:content medium="image" url="https://trustprune.com/images/brand/og-card.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry><entry><title type="html">Apple told Mac admins to hand-edit a PEM file. That is a symptom.</title><link href="https://trustprune.com/2026/10/28/apple-pem-hand-edit-emudhra.html" rel="alternate" type="text/html" title="Apple told Mac admins to hand-edit a PEM file. That is a symptom." /><published>2026-10-28T00:00:00+00:00</published><updated>2026-10-28T00:00:00+00:00</updated><id>https://trustprune.com/2026/10/28/apple-pem-hand-edit-emudhra</id><content type="html" xml:base="https://trustprune.com/2026/10/28/apple-pem-hand-edit-emudhra.html"><![CDATA[<p>In October 2026, <a href="https://support.apple.com/en-us/149555">Apple Support documented</a> the compromise of intermediate Certification Authorities operated by eMudhra and published Terminal steps that rewrite <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>. Safari and apps that use Apple’s networking frameworks were blocked automatically. Command-line tools that read the system PEM bundle were not.</p>

<p>Apple’s own summary of the gap is blunt:</p>

<blockquote>
  <p>On Mac, some command-line tools included with macOS or the Xcode Command Line Tools (including curl, git, python3, ruby, perl, and openssl) check certificates against /etc/ssl/cert.pem. For certificates that chain to a root CA certificate in this file, these tools don’t check Apple’s block or whether the certificate has been revoked.</p>
</blockquote>

<p>(<a href="https://support.apple.com/en-us/149555">About the compromised eMudhra intermediate CAs</a>, published 23 October 2026.)</p>

<p>Apple says most people do not need to touch the file. For administrators who will not wait for a future macOS update, the same page publishes <code class="language-plaintext highlighter-rouge">awk</code> and <code class="language-plaintext highlighter-rouge">sudo install</code> commands that strip <strong>emSign ECC Root CA - G3</strong> and, optionally, <strong>AAA Certificate Services</strong> from that PEM bundle. Coverage of the same guidance and the lingering CLI gap appears in <a href="https://www.heise.de/en/news/eMudhra-TLS-leak-Apple-leaves-macOS-command-line-issue-unresolved-11502949.html">heise online</a>, <a href="https://macsonly.com/article/2026/follow-up-apple-says-a-future-macos-release-will-fix-cert-pem-for-emudhra">Macs Only!</a>, and <a href="https://emudhra.we-have-a-problem.com/apple.html">we-have-a-problem.com</a>. Those reports also note that a later macOS update can put the roots back, so the hand edit may need repeating.</p>

<p>Hand-editing a system PEM bundle is workable as an emergency one-liner. As an operations practice, it is fragile.</p>

<p><strong>There is no structured backup.</strong> Apple’s first step copies the file once to <code class="language-plaintext highlighter-rouge">cert.pem.orig</code>. That is better than nothing, and still a single static sibling with no inventory of which certificates you removed, when, or on which machines.</p>

<p><strong>It is easy to break the file or remove the wrong root.</strong> A mistyped subject string in <code class="language-plaintext highlighter-rouge">awk</code> can leave the file untouched or remove an unintended matching CA. Apple warns that removing <strong>AAA Certificate Services</strong> can stop verification for sites that chain through unaffected intermediates. There is no dry-run that lists subjects and fingerprints before the write.</p>

<p><strong>It is not repeatable across a fleet.</strong> Copy-pasting four Terminal commands onto every Mac, then again after every update that restores the file, does not scale. MDM can wrap the same script; the underlying model is still “rewrite the vendor file by hand.”</p>

<p><strong>Updates silently undo the change.</strong> Apple states that “A macOS software update can replace <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code> with Apple’s version.” Reports after macOS 26.7.2 describe exactly that: both roots returned and curl accepted the test hosts again until the workaround was re-applied (<a href="https://github.com/galadran/we-have-a-problem.com/issues/157">we-have-a-problem.com issue 157</a>).</p>

<p><strong>There is no audit trail.</strong> Success is “the command shows nothing.” You do not get a before/after list of SHA-256 fingerprints, a backup directory you can restore from, or a recorded plan of what would change.</p>

<p>That pattern—treating a PEM or CA directory as a text file to edit under stress—is why trustprune exists. It runs these operations on the platform and application stores that support them. The Windows platform store supports listing only, though the Java store works on Windows when <code class="language-plaintext highlighter-rouge">JAVA_HOME</code> is set. OpenSSL CA bundles and cert directories are managed with <code class="language-plaintext highlighter-rouge">-app openssl</code> (list, add, allowlist, backup, restore). On Darwin, the macOS platform store works through Keychain paths; the CLI PEM bundle is a separate store: <code class="language-plaintext highlighter-rouge">-app ssl</code> manages <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code> directly (list, backup, allowlist, restore, <code class="language-plaintext highlighter-rouge">-dry-run</code>) — that path closed <a href="https://github.com/adamdecaf/trustprune/issues/257">issue #257</a>. The point is the workflow you should demand of any trust-store change, including the next incident that lands on Linux, Java, or a browser profile.</p>

<p>See which stores are actually on the machine:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune apps
trustprune apps <span class="nt">-format</span> json
</code></pre></div></div>

<p>Preview before writing. <code class="language-plaintext highlighter-rouge">-dry-run</code> works on <code class="language-plaintext highlighter-rouge">add</code>, <code class="language-plaintext highlighter-rouge">backup</code>, <code class="language-plaintext highlighter-rouge">restore</code>, and <code class="language-plaintext highlighter-rouge">allowlist</code>:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune backup <span class="nt">-dry-run</span>
trustprune allowlist <span class="nt">-file</span> allowlist.yaml <span class="nt">-dry-run</span>
trustprune restore <span class="nt">-dry-run</span>
</code></pre></div></div>

<p>Take a real backup first. Allowlisting refuses to run without one for that store:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune backup
trustprune backup <span class="nt">-app</span> ssl
trustprune backup <span class="nt">-app</span> java
trustprune backup <span class="nt">-app</span> firefox
</code></pre></div></div>

<p>Remove trust for CAs that are not on your allowlist (Chromium’s certificate blocklist is always applied as well):</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune allowlist <span class="nt">-file</span> allowlist.yaml
trustprune allowlist <span class="nt">-app</span> ssl <span class="nt">-file</span> allowlist.yaml
trustprune allowlist <span class="nt">-file</span> allowlist.yaml <span class="nt">-app</span> java
</code></pre></div></div>

<p>Roll back if HTTPS breaks for a tool you need:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>trustprune restore
trustprune restore <span class="nt">-app</span> ssl
trustprune restore <span class="nt">-app</span> java
trustprune list <span class="nt">-app</span> ssl
trustprune connect <span class="nt">-app</span> ssl https://example.com
</code></pre></div></div>

<p>On Linux, that path covers the platform CA directory and refresh tools. On Darwin, it covers Keychain-oriented platform operations (restore honors <code class="language-plaintext highlighter-rouge">-backup</code> / <code class="language-plaintext highlighter-rouge">-file</code> for the login-keychain backup directory), the CLI PEM bundle via <code class="language-plaintext highlighter-rouge">-app ssl</code>, and app stores such as Java and Firefox when they are present. Across machines, the same commands and allowlist file are repeatable only for the operations each store supports. The Windows platform store does not support every operation. Stores that support backups write timestamped entries under <code class="language-plaintext highlighter-rouge">~/.trustprune/</code> or <code class="language-plaintext highlighter-rouge">~/Library/trustprune/</code> that you can restore from (older <code class="language-plaintext highlighter-rouge">~/.cert-manage/</code> / <code class="language-plaintext highlighter-rouge">~/Library/cert-manage/</code> backups remain readable). Darwin <code class="language-plaintext highlighter-rouge">-app ssl</code> backups land at <code class="language-plaintext highlighter-rouge">~/Library/trustprune/ssl/&lt;timestamp&gt;/cert.pem</code>.</p>

<p>Apple’s PEM recipe is an honest interim for a real hole in macOS CLI trust. It also shows what “just edit the bundle” costs: silent reverts, brittle scripts, and no plan you can review before you write. Prefer a tool that dry-runs, backs up, restores, and applies the same policy on every store you actually use — including <code class="language-plaintext highlighter-rouge">-app ssl</code> for <code class="language-plaintext highlighter-rouge">/etc/ssl/cert.pem</code>. That is safer than hand-editing a PEM under pressure—not a guarantee that nothing will break.</p>

<h2 id="further-reading">Further reading</h2>

<ul>
  <li><a href="https://trustprune.com/2026/12/02/why-safari-blocked-that-ca-but-git-and-curl-still-trust-it.html">Why Safari blocked that CA but git and curl still trust it</a> — a store-by-store map of the same eMudhra incident</li>
  <li><a href="https://trustprune.com/2026/11/11/limited-pem-bundle-few-hostnames.html">A limited PEM bundle for a few hostnames</a> — work on a copy of a PEM bundle instead of hand-editing the system file</li>
</ul>

<p>Changing CA trust stores can break TLS, cut off access and reduce security, so back up first and proceed at your own risk. trustprune is provided as is, with no warranty, under the Apache License 2.0, and its authors and contributors accept no liability.</p>]]></content><author><name>trustprune</name></author><summary type="html"><![CDATA[Apple asked Mac admins to hand-edit /etc/ssl/cert.pem after the eMudhra compromise. Safari was already blocked; git and curl still read that PEM file.]]></summary><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://trustprune.com/images/brand/og-card.png" /><media:content medium="image" url="https://trustprune.com/images/brand/og-card.png" xmlns:media="http://search.yahoo.com/mrss/" /></entry></feed>