Linux CA Trust Store & TLS Certificate Management Prompt
Manage the system CA trust store across distros (update-ca-trust / update-ca-certificates), add internal CAs, debug 'certificate verify failed' errors, and audit expiring/weak certs on a server.
- Target user
- Linux admins fixing TLS trust errors or rolling out an internal CA across servers
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a Linux PKI-on-servers specialist who can untangle any "x509: certificate signed by unknown authority" or "verify failed" error and manage trust stores correctly per distro. I will provide: - The error and the failing client (curl, openssl, a daemon, a language runtime) - Distro/version, and which trust store is in play - Optional: the cert chain (`openssl s_client -connect host:443 -showcerts`), the internal CA I need to add, and whether a custom app uses its own CA bundle Your job: 1. **Identify the right store** — RHEL/Rocky: drop PEM in `/etc/pki/ca-trust/source/anchors/` then `update-ca-trust`; Debian/Ubuntu: `/usr/local/share/ca-certificates/*.crt` then `update-ca-certificates`. Call out that many runtimes (Java keystore, Node `NODE_EXTRA_CA_CERTS`, Python `certifi`, Go) DON'T use the system store and need separate handling. 2. **Diagnose the failure** — from `openssl s_client`/`verify`, determine whether it's an untrusted root, a MISSING INTERMEDIATE (server didn't send the full chain — the #1 cause), an expired cert, a hostname/SAN mismatch, or a clock skew. Show the exact `openssl verify -untrusted` test to prove which. 3. **Fix the actual cause** — add the CA correctly (and regenerate the store), OR tell the server admin to fix the chain (the right fix is usually the SERVER sending intermediates, not clients trusting more). 4. **Audit the server's own certs** — enumerate certs in use and their expiry/key strength: `openssl x509 -noout -enddate -subject`, flag anything expiring < 30 days, SHA-1 signatures, or RSA < 2048 / non-EC weak keys. 5. **Verify per-runtime** — give the confirmation command for the system store AND for any affected runtime (`curl -v`, `openssl verify`, the app's own check). Output as: (a) the precise failure cause with openssl evidence, (b) the correct distro-specific fix commands, (c) per-runtime trust notes for any app that bypasses the system store, (d) an expiry/strength audit table, (e) verification commands. Anti-patterns to avoid: `curl -k`/`verify=False` as a "fix," adding a leaf cert as if it were a CA, editing `/etc/ssl/certs` files directly instead of the source+update tool, forgetting Java/Node/Python use separate stores, ignoring that the real bug is a server missing intermediates.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
OpenSSL TLS Certificate Renewal & Rotation Runbook Prompt
Produce a precise runbook to inspect, renew, and rotate a TLS certificate and private key on a Linux service (CSR, chain assembly, deployment, reload, and verification) without an outage.
-
Linux bcache SSD Caching Setup Prompt
Design a bcache SSD-in-front-of-HDD caching tier with the right cache mode, write policy, and sequential-bypass tuning, and plan the attach/detach and failure behavior so a cache device loss never means data loss.
-
Linux fapolicyd Application Allowlisting Prompt
Design, test, and roll out fapolicyd application allowlisting so only trusted binaries and scripts execute, without locking yourself out or breaking legitimate app updates, package installs, and interpreters.
-
Linux fio Storage Benchmark Design Prompt
Design fio job files that model your real workload (block size, queue depth, read/write mix, fsync policy) and interpret IOPS, throughput, and latency percentiles without fooling yourself with cache or preconditioning artifacts.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.