Interview Prep/Networking/TLS and certificate errors

`curl: (60) SSL certificate problem: unable to get local issuer certificate`

BeginnerTroubleshootingTLS and certificate errors
Answer

Likely causes → The server sends only the leaf without the intermediate, the client's CA bundle lacks the root (private CA, old OS), or a TLS-inspecting proxy re-signs traffic with a corporate CA the client doesn't trust.

Diagnose →

openssl s_client -connect app.example.com:443 -servername app.example.com -showcerts </dev/null | grep -E 's:|i:'
# Only one certificate shown = missing intermediate

Fix → Serve the full chain (ssl_certificate fullchain.pem in nginx). For a private or proxy CA, add it to the trust store: cp corp-ca.crt /usr/local/share/ca-certificates/ && update-ca-certificates.

Prevent → Test endpoints with openssl s_client -verify_return_error in CI, not just a browser (browsers fetch missing intermediates themselves).

All Networking questions Roadmap: Networking for DevOps

More on TLS and certificate errors