nginx rejects a client certificate as having an unsupported purpose
Your error
client SSL certificate verify error: (26:unsupported certificate purpose)2 more lines it can showFix it fast
Most common cause, 1 of 3The client certificate's extended key usage leaves out clientAuth
Issue the certificate again from your own CA with an extension file that names clientAuth.
# client.ext
keyUsage = critical, digitalSignature
extendedKeyUsage = clientAuth
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 365 -extfile client.ext -out client.crtShort answer
nginx error (26:unsupported certificate purpose), worded unsuitable in OpenSSL 3, means one certificate in the client chain is not allowed for TLS client use. Usually the client certificate was issued for servers only and its extended key usage lacks clientAuth. Run openssl verify -purpose sslclient; the depth it prints tells you whether to reissue the leaf or a CA.
Which cause do you have?
nginx logs this at info level, below the default error level, so lower the level to see it. Then reproduce the check from the shell for the sslclient purpose. In openssl verify's output, depth 0 is the client certificate and depth 1 or more is a CA above it. OpenSSL 1.1.1 words the reason unsupported, OpenSSL 3 words it unsuitable; the number is the same.
# server or http block: error_log /var/log/nginx/error.log info;
sudo grep "client SSL certificate verify error" /var/log/nginx/error.log | tail -n 3
openssl verify -purpose sslclient -CAfile /etc/nginx/client-ca.crt client.crtThen find the line you see in this list and open its fix:
- 1The client certificate's extended key usage leaves out clientAuth
error 26 at 0 depth lookup, and the extendedKeyUsage of client.crt lists serverAuth but not clientAuth - 2An intermediate or root CA carries an extended key usage without clientAuth
error 26 at 1 depth lookup or higher, while the leaf itself lists clientAuth - 3The key usage on the client certificate does not include a signing bit
error 26 at 0 depth lookup although clientAuth is listed
What does the error look like?
client SSL certificate verify error: (26:unsupported certificate purpose)client SSL certificate verify error: (26:unsuitable certificate purpose)error 26 at 0 depth lookup: unsuitable certificate purpose
Cause 1 of 3
The client certificate's extended key usage leaves out clientAuth
You seeerror 26 at 0 depth lookup, and the extendedKeyUsage of client.crt lists serverAuth but not clientAuth
Check
Error 26 at depth 0 usually means the client certificate's extended key usage does not include clientAuth. When that extension is present, OpenSSL lets the certificate act as a TLS client only if clientAuth is in the list, so print the leaf's extensions.
openssl x509 -in client.crt -noout -subject -issuer -ext extendedKeyUsageFix
Issue the certificate again from your own CA with an extension file that names clientAuth. Do not plan on a public web certificate for this: Let's Encrypt removed the client authentication usage from its default profile on 11 February 2026, ended its tlsclient profile on 8 July 2026, and points people who need client authentication to a private CA.
# client.ext
keyUsage = critical, digitalSignature
extendedKeyUsage = clientAuth
openssl x509 -req -in client.csr -CA ca.crt -CAkey ca.key -CAcreateserial -days 365 -extfile client.ext -out client.crtVerify
openssl verify prints client.crt: OK for the new file; install it on the client and retry.
openssl verify -purpose sslclient -CAfile /etc/nginx/client-ca.crt client.crtConfirmed by letsencrypt.org
Cause 2 of 3
An intermediate or root CA carries an extended key usage without clientAuth
You seeerror 26 at 1 depth lookup or higher, while the leaf itself lists clientAuth
Check
Error 26 at depth 1 or higher means a CA certificate above the client has an extended key usage that excludes clientAuth. OpenSSL does not require that extension on CAs, but when one is there without anyExtendedKeyUsage it must include clientAuth for the sslclient purpose, and the rule covers the trust anchor too.
openssl x509 -in /etc/nginx/client-ca.crt -noout -subject -ext extendedKeyUsageFix
Reissue that CA certificate with no extended key usage, or with clientAuth in it, and sign the client certificates again from the new CA.
# extension section used when signing the CA certificate
extendedKeyUsage = serverAuth, clientAuthVerify
Rerun the verify command; the failing depth no longer appears.
openssl verify -purpose sslclient -CAfile /etc/nginx/client-ca.crt client.crtConfirmed by docs.openssl.org
Cause 3 of 3
The key usage on the client certificate does not include a signing bit
You seeerror 26 at 0 depth lookup although clientAuth is listed
Check
Error 26 at depth 0 with clientAuth present points at the key usage extension of the client certificate. For a target certificate checked as a TLS client, OpenSSL wants that extension, when present, to allow digitalSignature or keyAgreement, so a certificate limited to keyEncipherment fails.
openssl x509 -in client.crt -noout -ext keyUsage,nsCertTypeFix
Reissue with a key usage that contains digitalSignature, using the extension file from the first cause, and leave the legacy nsCertType extension out: if it is present, OpenSSL also demands its SSL client bit.
keyUsage = critical, digitalSignature
extendedKeyUsage = clientAuthVerify
Repeat the purpose check against the new certificate.
openssl verify -purpose sslclient -CAfile /etc/nginx/client-ca.crt client.crtConfirmed by docs.openssl.org
How do I stop it coming back?
- Keep a separate extension file for each role your CA signs (server, client, intermediate), so client certificates always carry clientAuth.
- Run openssl verify -purpose sslclient on each client certificate before it leaves your hands.
- Log $ssl_client_verify and $ssl_client_s_dn while rolling out client certificates, so a refusal names the certificate.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine on the same stack: TaxiDex, stegnor.com.