Sphere
Log in Join
☆ 2

mTLS client cert rejected tlsv1 alert unknown ca

Setting up mutual TLS between our service and a partner. They give us a client cert to present. Our nginx requires it with ssl_verify_client on. The handshake fails and nginx error.log says: SSL_do_handshake() failed (SSL: error:0A000418:SSL routines::tlsv1 alert unknown ca). The partner insists their cert is valid. What does unknown ca actually mean here? Neither side gives a particularly helpful error message from the client's point of view.

⚑ Report

4 replies

☆ 0
P prom ·2026-10-23#1

It means the client could not verify our server certificate CA, or we could not verify their client cert CA, the alert is sent by whichever side rejects the other. Unknown ca on our nginx usually means ssl_client_certificate does not contain the CA that signed their client cert. We need the issuing CA chain, not their leaf.

⚑ Report
☆ 0
T tf ·2026-10-23#2

Turns out the partner had given us the leaf cert, not the intermediate CA that signed it. Asked for the full chain, put that in ssl_client_certificate, and the handshake succeeded. The error was us rejecting their cert, not them rejecting ours.

⚑ Report
☆ 0
H hex97 ·2026-10-28#3

To tell which direction it is, capture the handshake in Wireshark and look for the alert record and its direction. Also check ssl_verify_depth, if their chain is longer than the default depth (often 1), verification fails even with the right CA.

⚑ Report
☆ 0
P plastic ·2026-10-29#4

And if you only want to verify their cert against one specific CA but the chain is incomplete, ask them to send the full chain in the TLS handshake itself (some clients only send the leaf). Without the intermediate on either side, unknown ca is inevitable.

⚑ Report
Log in to reply.