Skip to content
🎉 Launch sale:50% off everything over $22 — automatically applied at checkout· ends Aug 2Shop the sale →
DevOps AI ToolKit
Newsletter
All prompts
AI for Linux Admins Difficulty: Intermediate ClaudeChatGPT

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

More Linux Admins prompts & error guides

Browse every Linux Admins prompt and troubleshooting guide in one place.

Free download · 368-page PDF

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.