mTLS between services fails with `tls: bad certificate` on the server side logs.
AdvancedTroubleshootingTLS and certificate errors
Answer
Likely causes → The client presented no cert or one signed by a CA not in the server's client-CA bundle, the client cert lacks clientAuth in Extended Key Usage, or it expired.
Diagnose →
openssl x509 -in client.crt -noout -issuer -dates -ext extendedKeyUsage
openssl s_client -connect svc:8443 -servername svc -cert client.crt -key client.key -CAfile ca.crt
Fix → Issue the client cert from the trusted CA with extendedKeyUsage = clientAuth, and put that CA in the server's ssl_client_certificate / ClientCAs.
Prevent → Automate workload certificates (SPIFFE/SPIRE, mesh) and monitor rotation.
More on TLS and certificate errors
`curl: (60) SSL certificate problem: certificate has expired`Beginner`curl: (60) SSL certificate problem: unable to get local issuer certificate`Beginner`SSL: no alternative certificate subject name matches target host name 'api.example.com'`BeginnerSome clients get the wrong certificate (another site's) from a shared IP.Intermediate`SSL routines::sslv3 alert handshake failure` from `openssl` or curl.IntermediatePython `requests` fails with `SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain`.Beginner