Skip to content
المشاريع

حول

Audit and trim CA trust stores on your system and apps: list, backup, whitelist, restore.

الأنظمة والبنية التحتية

كيف تُقاس هذه الأرقام

ما يمكنك فعله

  • list - Show trusted certificates in a platform or app store (audit)
  • backup / restore - Capture and roll back CA trust
  • allowlist - Distrust certificates that are not on your allowlist
  • create - Write a PEM bundle, Java truststore (jks, pkcs12), or unsigned Apple configuration profile (mobileconfig) of allowlisted certificates from a store (read-only)

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
جارٍ جمع السجل

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

trustprune

CI

Your machine trusts hundreds of Certificate Authorities by default. Most of them you have never heard of. One bad CA is enough to break HTTPS for everyone who trusts it.

In October 2026, the private keys of eight eMudhra intermediate CAs were compromised. Six of them could issue TLS certificates for any website. Apple blocked those certificates in Safari and system frameworks starting 19 October 2026, and later blocked the emSign ECC Root CA - G3. Command-line tools that still read /etc/ssl/cert.pem (git, curl, python3, and others) kept trusting the compromised chains until users removed the roots by hand — and a subsequent macOS update can restore Apple's copy of that file. The pattern is old: DigiNotar, Symantec, WoSign, and many others. The CA system still ships with more trust than most people need, and removing it is still harder than it should be.

trustprune gives you a single CLI to list, backup, allowlist (distrust), restore, and create PEM bundles, Java truststores, or unsigned Apple configuration profiles from the CA trust stores on your platform and in apps such as Java, Chrome, and Firefox.

Trust should be earned, not defaulted.

Backups

New backups are written under ~/.trustprune/ (or ~/Library/trustprune/ on Darwin). Existing backups under ~/.cert-manage/ or ~/Library/cert-manage/ are still discovered read-only for restore; nothing is moved, renamed, or deleted from the old tree. When both trees have entries, the newest basename wins (primary path preferred on ties). Prefer an explicit restore --backup path if you mix older NSS filename layouts.

30-second quickstart

# 1. See what you currently trust
trustprune list
trustprune list --count
trustprune list --app java
trustprune list --app java --store /path/to/cacerts          # skip JAVA_HOME search
trustprune list --app certifi --store /path/to/venv/.../cacert.pem

# 2. Always take a backup before changing trust
trustprune backup
trustprune backup --app java

# 3. Allowlist: keep only the CAs you want (requires a prior backup)
trustprune allowlist --file urls.yaml
trustprune allowlist --app java --file urls.yaml
trustprune allowlist --app java --store /path/to/cacerts --file allowlist.yaml

# 4. Roll back if something breaks
trustprune restore
trustprune restore --app java

# 5. Or write a PEM bundle, Java truststore, or unsigned Apple configuration profile and leave the store unchanged
trustprune create --file urls.yaml --out ca-bundle.pem
trustprune create --file urls.yaml --format jks --out trusted.jks
trustprune create --file urls.yaml --format mobileconfig --out roots.mobileconfig

Allowlist files are YAML or JSON. See docs/allowlists.md for fingerprints, country filters, and generating an allowlist from hostnames, platform presets, or browser history.

A Mozilla included-root baseline (roots certdata.txt trusts for server authentication) is at docs/downloads/allowlists/mozilla-included.yaml. A data-driven web baseline (the subset of those roots that anchored TLS chains of popular sites) is at docs/downloads/allowlists/web.yaml. --file accepts those https URLs or a local copy. Steps are under Baseline allowlists.

Go programs can apply that allowlist without changing a store. certpool.New reads the system store and returns an *x509.CertPool of the certificates the allowlist keeps. certpool.FromFile applies the same filter to a PEM bundle on disk. See Go library.

Safety first: Prefer experimenting against temp or container stores when learning. Back up first, every time. See Safety and the docs site.

Features

Command What it does
list Show trusted certificates in a platform or app store (audit)
backup / restore Capture and roll back CA trust
allowlist Distrust certificates that are not on your allowlist
create Write a PEM bundle, Java truststore (jks, pkcs12), or unsigned Apple configuration profile (mobileconfig) of allowlisted certificates from a store (read-only)
add Add certificates to a store
connect Probe a remote HTTPS host using a chosen store
diff Compare two certificate files. One certificate each prints differing fields. PEM bundles are compared by SHA-256 fingerprint
chain Show the certificate chain for a file or URL (read-only)
gen-allowlist Build an allowlist from hostnames, platform presets, browser history, or URL lists
apps List supported application stores with detection status and paths
version Print the version (trustprune version, trustprune --version, or trustprune -V)

Allowlisting also applies Chromium's certificate blocklist, a Mozilla certdata.txt blocklist (server-auth distrust and roots whose distrust-after date has passed), Mozilla OneCRL (issuer+serial and subject+SPKI pairs of revoked intermediates), Apple's published blocked-certificate list, the CCADB Mozilla Removed CA Certificate Report (except removals that are only expiry or a voluntary / CA-requested withdrawal), the CCADB Microsoft Included CA Certificate Report (roots whose Microsoft Status is Disabled), and a built-in denylist of known-distrusted roots and their public keys (DigiNotar, CNNIC, WoSign, StartCom, Symantec legacy roots, the compromised eMudhra G3 intermediates, DYMO Root CA (for localhost), and the Sennheiser HeadSetup roots), so those certificates are never kept. That behavior cannot be disabled today.

Platform and application support

Honest status as of November 2026. Levels match what the code does today.

Platforms

Level Platform Notes
Supported Linux (Alpine, Debian, Ubuntu, Rocky, Fedora/RHEL, Arch) System CA dir list, add, allowlist, backup, restore (see Safety)
Partial Darwin / macOS Keychain-backed list/add/allowlist/backup/restore; system roots are SIP-protected; restore honors --backup for login-keychain backups
List-only Windows list works (PowerShell export of machine stores); add, backup, allowlist, and restore exit 1 with an error until they are implemented
Supported FreeBSD 13, 14, and 15 System CA store through certctl: list, add, allowlist, backup, restore (see Safety). Live changes need root. CI runs unit/CLI tests and a read-only list plus a dry-run allowlist in a FreeBSD guest via vmactions/freebsd-vm
Documented iOS No live system store and no silent add or remove of preinstalled roots. list --file reads .mobileconfig certificate payloads, including signed CMS/PKCS#7 profiles (the signature is not verified). create --format mobileconfig writes an unsigned profile that adds allowlisted roots. On-device audit and guided distrust steps are in the research note.

Applications

Level Application Notes
Supported Java (cacerts) Paths differ by distro and JDK vendor; use --app java. Windows needs a usable JAVA_HOME / cacerts path. Missing cacerts, a directory in its place, or a wrong keystore password fails immediately. Keystore password defaults to changeit; set TRUSTPRUNE_JAVA_STOREPASS to override (custom values use -storepass:env, not argv, and are not logged; no CLI flag; no other passwords are guessed). create --format jks or pkcs12 writes a new truststore with that password and does not modify cacerts.
Partial Chrome Linux uses NSS (~/.pki/nssdb); Darwin/Windows list a built-in snapshot of the Chrome Root Store (read-only). Linux NSS restore uses the same recorded-profile guard as Firefox (--force overrides a mismatch or a backup with no recorded profile).
Partial Firefox NSS profile cert8.db / cert9.db. Backups record the profile directory; restore into a different profile, or from a backup with no recorded profile, is refused unless --force.
Partial pdfsig / poppler NSS DB used by pdfsig (--app poppler). --store <dir> is -nssdir and skips discovery. Otherwise the directory is the newest Firefox profile whose name contains default and that has a regular non-empty cert9.db (cert8-only profiles are skipped) when certutil -L -d sql:<dir> succeeds, or when certutil cannot be found or run. A profile that fails to open falls back to ~/.pki/nssdb and does not try /etc/pki/nssdb. With no cert9 profile, /etc/pki/nssdb is used when it has a regular non-empty cert9.db and the probe succeeds or certutil is unavailable; otherwise ~/.pki/nssdb. list shows that path. apps marks poppler found only when the chosen directory contains cert9.db. Allowlist refuses a latest backup recorded for a different directory when this store has no backup of its own, unless --force. Built-in libnssckbi roots are listed. A root that exists only in that module is distrusted with a p,p,p override.
Documented Evince / Papers No --app of their own. Papers uses poppler's default NSS DB when the effective backend is NSS, so host --app poppler covers that case, including built-in libnssckbi roots. Confirm the database path for a sandboxed Papers install (for example Flatpak) before relying on pruning; it can use a different XDG_CONFIG_HOME. A GPG backend is report-only, like poppler's GPG backend. Evince does not validate signatures (main at e822030). Sources: platforms.
Partial Okular PDF signature store (--app okular). Reads ~/.config/okular-generator-popplerrc ($XDG_CONFIG_HOME if set) [Signatures]. Effective backend is SignatureBackend if set, else POPPLER_SIGNATURE_BACKEND, else the compiled default (NSS). NSS: UseDefaultCertDB=false uses DBCertificatePath; otherwise the same lookup as --app poppler. list shows that DB path. GPG: report only, no changes. Flatpak and other sandbox config paths are unverified.
Supported Python certifi Mozilla CA bundle used by requests and friends (--app certifi). Discovery via certifi.where(), pip vendored certifi, site-packages fallbacks; --store overrides the bundle on list/backup/connect/restore/add/allowlist. Restore records the bundle path and refuses a cross-path restore unless --force.
Supported OpenSSL CA bundle PEM files and OpenSSL cert directories (--app openssl): list/add/allowlist/backup/restore. Path order: SSL_CERT_FILE, CURL_CA_BUNDLE, LibreSSL when present (Homebrew .../etc/libressl/cert.pem and certs, then OpenBSD/Alpine /etc/ssl/cert.pem), distro/Homebrew OpenSSL defaults, then git http.sslCAInfo. LibreSSL wins when its Homebrew openssl exists (/usr/local/opt/libressl/bin/openssl, /opt/homebrew/opt/libressl/bin/openssl) or openssl version starts with LibreSSL (not Darwin /usr/bin/openssl). Cert directories then use openssl certhash instead of c_rehash. --bundle <pem> selects an explicit PEM file for list, add, allowlist, backup, restore, create, chain, and connect and skips that discovery. PEM backups record the bundle path; restore into a different PEM (discovery or --bundle) is refused unless --force. Discovery allowlist accepts a backup recorded for the discovered PEM or a legacy backup with no source (a source-less backup may belong to another PEM and does not show the live file is recoverable). Hashed cert directories are not selected by --bundle. Darwin /etc/ssl/cert.pem stays --app ssl.
Supported (Darwin) ssl (/etc/ssl/cert.pem) list/add/allowlist/backup/restore for the CLI PEM bundle Apple keychain blocks do not cover; list uses a cryptobyte fallback for negative-serial certs Go rejects; truly unparsable PEM blocks stay skipped (stderr warning) and add/allowlist keep them when rewriting; see platforms
Partial Adobe Acrobat / Reader (--app acrobat) Finds the newest addressbook.acrodata on Windows (%APPDATA%\Adobe\Acrobat\<ver>\Security) and macOS (~/Library/Application Support/Adobe/Acrobat/<ver>/Security). DC is newer than a numbered folder (2024, then 11.0, then 10.0). backup and restore copy that file unchanged and refuse while Acrobat, AcroRd32, or AdobeReader is running. list prints a read-only report of the AATL download, the EUTL download, and Windows store trust (iMSStoreTrusted), or acrobat: not installed (exit 0). add, allowlist, and connect print a pruning guide. The file format is unverified. Listing address book entries read-only was not attempted. Linux is not probed. Registry and plist settings are read and never written. See platforms.
Guide only Android (--app android) No host store and no device I/O. apps always reports guide only. list --app android --file <dir> --allowlist <path> prints a disable report on a pulled cacerts directory. add, allowlist, backup, restore, create, and connect print Settings and adb steps and do not write. See platforms.
Guide only Foxit PDF Reader / Editor (--app foxit) Detects an install on Windows and macOS. apps reports guide only and the install path. list, add, allowlist, backup, restore, and connect print a pruning guide (Trusted Certificates, FATL/EUTL, Windows Integration) and do not read or write Foxit trust data. The on-disk Trusted Certificates list is unverified. See platforms.

Environment

Variable Meaning
TRUSTPRUNE_JAVA_STOREPASS When set (non-empty after trim), used as the keystore password for every keytool call under --app java and for create --format jks or pkcs12. Custom values are passed via keytool -storepass:env (child env + sudo --preserve-env) so the secret is not on the process or sudo command line and is not logged; the default changeit still uses -storepass changeit. Requires keytool -storepass:env (JDK 6+). Leading/trailing whitespace is stripped; whitespace-only falls back to changeit. No other passwords are guessed; there is no CLI flag. Details: usage.

Safety

Certificate-store edits can break HTTPS for browsers, package managers, and language runtimes. Treat every change as privileged.

  1. Backup first. Allowlisting without a prior backup fails on purpose. Run trustprune backup (and --app … when targeting an app) before any allowlist. restore (and restore --dry-run) with no backup for that store also refuses before any write and exits 1, for example ERROR: no backup for openssl in ~/.trustprune/openssl; run: trustprune backup --app openssl. Discovery-based OpenSSL restore (no --bundle) follows the discovered PEM: it uses a backup recorded for that file (a legacy backup with no source still matches) and refuses a backup recorded for a different bundle unless --force. Allowlist of a discovered PEM uses those same candidates, not merely the newest openssl backup. A legacy backup with no source may belong to another PEM and does not show the live file is recoverable. With --bundle <pem>, backup records that file, restore and allowlist errors name that PEM and suggest trustprune backup --app openssl --bundle <pem> (plus --backup <dir> --force when a latest backup is for a different PEM), and restore of a different path is refused unless --force.
  2. Prefer temp or container stores when experimenting. Do not point destructive tests at real /etc or /usr CA paths.
  3. Preview with --dry-run. add, backup, restore, and allowlist accept --dry-run to print the plan without writing to any store. allowlist --dry-run lists kept certificates in a sorted SUBJECT/SHA256 table and ends with dry-run: N kept, M removed; , K unmatched and , P allowlisted but blocked (<source>) are added when they apply. -v/--verbose adds per-certificate remove and keep lines, with a reason on each remove. --format json writes a pretty-printed plan, or {"count": N} with --count. A completed allowlist ends with N removed, M kept and the same extra clauses. --count prints only that removed count. -v/--verbose is accepted on every command and before the subcommand (trustprune -v list …).
  4. Elevation on Linux/unix. CA refresh and root-owned file copies escalate with sudo when present on PATH, otherwise su root -c …. Already-root processes run the command directly. Password prompts use the controlling TTY; non-interactive hosts need cached credentials or a root shell.
  5. No stray positionals. Commands other than connect, chain, and diff accept only flags. connect accepts one URL (--url or one positional, not both). chain accepts one target (--file, --url, or one positional argument, not a positional together with either flag). A positional path that is an existing regular file is read like --file; any other positional is a host or URL, like --url, and still needs --remote to dial. --url implies --remote. diff accepts exactly two certificate paths. Any other positional argument is rejected with exit 2 before any write (unexpected argument(s): …). Flags after a positional are still parsed, so trustprune add --file x.pem extra --dry-run is still a usage error and does not write. A shell glob that expands to more than one file can produce those extra arguments and is rejected the same way.

Linux restore uses a temp-dir-then-swap so a failed restore leaves the live CA directory intact. Explicit backup paths use --backup. For java, certifi, and poppler, restore --store is the store to restore into, matching backup/list; a backup taken from a different path is refused unless --force. For openssl, --bundle <pem> is the live PEM for list, add, allowlist, backup, restore, create, chain, and connect; --backup is the backup source, and a backup recorded for a different PEM is refused unless --force. NSS backups copy cert9.db / cert8.db and related profile files and record the profile directory; restore into a different profile, or from a backup with no recorded profile, is refused unless --force. Allowlist refuses when this directory has no backup of its own and the newest backup was recorded for a different directory, unless --force. Darwin platform restore honors --backup for the login-keychain backup directory. Full detail: Backup and restore.

Install

Download a binary from the latest release (tag v1.0.0), or build from source (Go 1.27 required):

git clone https://github.com/adamdecaf/trustprune.git
cd trustprune
make build          # produces ./trustprune
# or cross-compile:
make dist           # linux / osx / windows binaries under bin/

You can also install with the Go toolchain:

go install github.com/adamdecaf/trustprune@latest
# or, for unreleased work:
# go install github.com/adamdecaf/trustprune@master

go install github.com/adamdecaf/trustprune@latest installs the latest tag (v1.0.0). @master tracks unreleased work. Either form installs a binary named trustprune (Go uses the last path element).

Usage examples

# Platform store
trustprune list                          # table (default); formats: table, long, json, openssl, observatory
trustprune list -v                       # full fingerprint, serial, path, NOT-BEFORE, NOT-AFTER
trustprune -v list                       # same; -v/--verbose is accepted on every command and before the subcommand
trustprune list --format long           # multi-line dump
trustprune list --format openssl
trustprune list --format json --out certs.json          # --out writes every list format and --count; stdout stays empty
trustprune list --format observatory --out report.yaml
trustprune list --ui web             # local checklist page (prints the URL if headless)
trustprune list --ui web --allowlist allowlist.json  # start from an allowlist file; download writes JSON

# Apps
trustprune list --app java
trustprune list --app chrome
trustprune list --app firefox
trustprune list --app poppler
trustprune list --app poppler --store /path/to/nssdb   # pdfsig -nssdir; list shows this path
trustprune list --app okular                           # shows the NSS DB path, or that the backend is GPG

# From a file, or a downloaded PEM or DER bundle (Mozilla certdata.txt also works; not a TLS site lookup).
# Apple configuration profiles (.mobileconfig), including signed CMS/PKCS#7 files, work with list --file too.
# list --url: a non-200 is an error that names the status; the chain hint is only for a 200 HTML body.
trustprune list --file example.crt
trustprune list --file roots.mobileconfig
trustprune list --url https://raw.githubusercontent.com/mozilla-firefox/firefox/main/security/nss/lib/ckfw/builtins/certdata.txt

# Add
trustprune add --file cert.pem
trustprune add --file cert.pem --app java
trustprune add --file cert.pem --app certifi --store /path/to/cacert.pem

# Allowlist, backup, restore
trustprune backup
trustprune allowlist --file urls.yaml
trustprune restore                 # latest backup
trustprune restore --backup <path>  # explicit backup path
trustprune restore --app java --store /path/to/cacerts   # java/certifi/poppler: store to restore into

# Generate an allowlist
trustprune gen-allowlist --out allowlist.yaml --hosts example.com,api.example.com
trustprune gen-allowlist --out allowlist.yaml --hosts example.com --no-presets
trustprune gen-allowlist --out allowlist.yaml --presets linux
trustprune gen-allowlist --out allowlist.yaml --from firefox
trustprune gen-allowlist --out allowlist.yaml --from browsers
trustprune gen-allowlist --out allowlist.yaml --file urls.txt
trustprune gen-allowlist --out allowlist.yaml --hosts example.com --no-presets --stats
# --stats prints connection and timing details to stderr. Omit it and that block is not printed.
# --out is required: without it, gen-allowlist prints "ERROR: required flag --out not set" and exits with status 2
# Apply the result with the existing allowlist command (optionally a PEM bundle):
#   trustprune allowlist --file allowlist.yaml
#   trustprune allowlist --file allowlist.yaml --app openssl --bundle /path/to/ca-bundle.pem
# Or write a PEM bundle, Java truststore, or unsigned Apple configuration profile and leave the store unchanged (--format pem is the default):
#   trustprune create --file allowlist.yaml --out ca-bundle.pem
#   trustprune create --file allowlist.yaml --format jks --out trusted.jks
#   trustprune create --file allowlist.yaml --format pkcs12 --out trusted.p12
#   trustprune create --file allowlist.yaml --format mobileconfig --out roots.mobileconfig
#   trustprune create --file allowlist.yaml --app certifi --store /path/to/cacert.pem --out kept.pem
#   trustprune create --file allowlist.yaml --app openssl --bundle /path/to/ca-bundle.pem --out kept.pem

# Verify connectivity after a change
trustprune connect google.com            # bare host; treated as https://google.com
# ok https://google.com tls1.3 root=<name> sha256=<16 hex> leaf-expires=<YYYY-MM-DD>
trustprune connect -v google.com         # chain table after the summary; on verification failure, the presented chain. Ignored with --format json
trustprune connect --format json google.com
trustprune connect --app java https://example.com
# ERROR: https://expired.badssl.com: certificate expired 2015-04-12

# Show a certificate chain (read-only). Default table matches connect -v (16-hex SHA256).
# A positional path that is an existing file is --file. Anything else is --url.
trustprune chain --file leaf.pem --app openssl --bundle /path/to/ca-bundle.pem
trustprune chain leaf.pem --app openssl --bundle /path/to/ca-bundle.pem
trustprune chain -v --file leaf.pem --app openssl --bundle /path/to/ca-bundle.pem  # full 64-hex SHA256
trustprune chain --file leaf.pem --untrusted   # include a private CA
trustprune chain --file leaf.pem --all         # untrusted, expired, not-yet-valid, and blocklisted
trustprune chain --url example.com             # TLS lookup when no local chain is found (30s timeout); --url implies --remote
trustprune chain example.com --remote          # same lookup; a positional URL still needs --remote

# Compare two certificates (PEM or DER). Exit 0 when identical, 1 when they differ.
# One certificate each prints differing fields. Identical output is "identical".
# A bundle prints "- <sha256> <subject>" (removed) and "+ <sha256> <subject>" (added),
# then "removed N added N unchanged N". Identical bundles print "identical".
# -v prints left: and right: paths on bundle text. JSON ignores -v.
trustprune diff old.pem new.pem
trustprune diff backup.pem live.pem
trustprune diff --format json old.pem new.der

trustprune version
trustprune --version
trustprune -V
# No subcommand prints usage and exits 0; an unknown --app (e.g. --app nope) exits 1 and lists the valid apps

More detail: docs/basics.md, docs/allowlists.md.

Building and testing

Go 1.27 is required (go.mod).

make build          # vet + unit tests + binary
make test           # full suite (uses Docker when available)
make coverage-floor # pkg/store >= 40%, pkg/cmd >= 35% (also run in CI)
MOCKED=true make test   # skip Docker-backed tests

Backup/restore tests use temp directories only and refuse paths under /etc or /usr. Do not point destructive tests at a real system CA directory.

Cross-platform binaries: make linux, make osx, make win, or make dist. CI cross-compiles linux/darwin/windows (amd64/arm64), runs unit tests on Ubuntu/macOS/Windows (including arm64 runners) and FreeBSD (via vmactions/freebsd-vm under an empty HOME), and runs Alpine/Debian/Ubuntu/Rocky/Fedora/Arch plus Firefox/Chrome Docker distro suites.

Contributing

Help with docs, bugfixes, tests, and new or deeper store support is welcome. One focused PR at a time works best. The release plan is in ROADMAP.md.

See CONTRIBUTING.md for the make gates, CI, and secret scan.

  1. Fork and clone the repo.
  2. Use Go 1.27; run make build and make test (or MOCKED=true make test) before opening a PR.
  3. Prefer temp / container stores in tests — never point destructive tests at a real system CA directory.

This project follows the Google Code of Conduct.

Why this matters

Research keeps showing that default trust stores are larger than most users need:

Incidents keep showing the same pattern: one bad or unwanted root is enough to break HTTPS for everyone who trusts it. Browsers and vendors react after the fact; a CLI that can list, backup, allowlist, and restore trust stores is how you take that control yourself. A non-exhaustive sample of cases that justify that tooling (not a complete history of CA failures):

  • DigiNotar (2011): After fraudulent certificates — including a *.google.com wildcard used in active MITM attacks — were issued from DigiNotar’s CA, Mozilla removed the DigiNotar root from its products. Anyone still trusting that root in a local store remained exposed until they removed it.
  • Lenovo Superfish (2015): Preinstalled adware installed a shared root CA (with a recoverable private key) into Windows and Firefox trust stores, so anyone with that key could impersonate any HTTPS site on affected machines. Users had to find and remove a vendor-installed root that browsers had not shipped.
  • Dell eDellRoot (2015): Dell Foundation Services installed the eDellRoot certificate and its private key into the Windows Trusted Root store, enabling MITM and spoofing. Microsoft later marked it untrusted via CTL updates; operators still needed to remove the root and stop the component that reinstalled it.
  • CNNIC / MCS intermediate (2015): CNNIC issued an unconstrained intermediate that a customer loaded into an SSL-inspection firewall, which then minted certificates for domains it did not control. Mozilla pushed the intermediate into OneCRL; the episode showed how a single trusted intermediate can MITM any site.
  • WoSign / StartCom (2016): After backdated SHA-1 certificates, undisclosed ownership ties, and other failures, Mozilla and Google stopped trusting new certificates from these CAs. Default trust had to be walked back in stages across every affected client store.
  • Symantec legacy PKI (2017–2018): Systemic mis-issuance and weak oversight led Chrome and Mozilla to phase out trust in Symantec’s legacy roots (Thawte, VeriSign, GeoTrust, RapidSSL, and related brands). Site operators had to re-issue; users depended on browser updates to stop trusting a long-defaulted hierarchy.
  • Kazakhstan MITM root (2019): ISPs directed users to install a government root so HTTPS could be intercepted. Mozilla and Google blocked that root even when users installed it manually — a reminder that “trusted because someone put it in my store” is not the same as trustworthy.
  • TrustCor (2022): After researchers documented close ties between TrustCor and a company that distributed a malware SDK, Mozilla set distrust-after dates on TrustCor’s roots and later removed them from NSS. No public TLS mis-issuance was required for browsers to decide the CA should not stay in default trust.
  • e-Tugra (2023): Following a breach of non-CA systems, inadequate change control, and slow incident response, Mozilla removed e-Tugra’s roots from its store (Chrome did likewise). Another case where default inclusion outlasted confidence in the operator.
  • Entrust (2024): After years of compliance failures and delayed remediations, Chrome stopped trusting new Entrust/AffirmTrust TLS certificates (SCT after 11 November 2024). Mozilla took parallel distrust action. Large, long-trusted CAs can still leave users waiting on vendor schedules unless they can audit and trim local stores themselves.

Background: CA incidents

Incidents keep showing that "trusted by default" is not the same as "trustworthy." Beyond eMudhra / Apple (October 2026), a non-exhaustive historical sample:

Vendors and browsers react after the fact. trustprune is for putting that control on your own machine before the next incident.

Related projects

Project Description
drduh/macOS-Security-and-Privacy-Guide Community guide to hardening macOS, including a Certificate Authorities section.
kirei/catt Certification Authority Trust Tracker — scripts and data for which CAs root programs trust.
mkcert.org API to build custom PEM trust stores from Mozilla’s root list (include or exclude by label).
mozilla/tls-observatory Suite for scanning TLS configurations and inspecting X.509 certificates.
MSylvia/CertTrustSetter Tool for installing certificates and modifying trust settings on macOS.
nabla-c0d3/trust_stores_observatory Continuously monitors and records major platforms’ root certificate stores.
ntkme/security-trust-settings-tools macOS Keychain trust-settings tools for blocking certificates by fingerprint.
sebdeckers/tls-keygen Generates a self-signed TLS certificate and adds it to the local trusted store.

Related reading

Disclaimer

Editing CA trust stores can break TLS for your system, browsers, package managers and other apps. It can lock you out of sites and services, and it can weaken your security if you remove, add or restore the wrong certificates. You use trustprune at your own risk. Run backup before every change, keep those backups somewhere safe, and test against a temporary or container store first.

trustprune is provided "AS IS", without warranties or conditions of any kind. To the fullest extent the law allows, the authors and contributors are not liable for any damage, data loss, outage or security issue that comes from using it. See LICENSE (Apache License 2.0, Sections 7 and 8) for the full terms.

trustprune is not affiliated with or endorsed by Apple, Google, Mozilla, Oracle or any CA.

License

Apache License 2.0. See LICENSE.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…