Error message
SSL routines:tls_post_process_client_hello:no shared cipher
Also printed as
- SSL_do_handshake() failed (SSL: error:0A0000C1:SSL routines::no shared cipher)
- error:0A0000C1:SSL routines::no shared cipher
openssl s_server (OpenSSL 3.x) logs "error:0A0000C1:SSL routines:tls_post_process_client_hello:no shared cipher:<source>"; nginx logs "SSL_do_handshake() failed (SSL: error:0A0000C1:SSL routines::no shared cipher) while SSL handshaking" at info level, so it is invisible with the default error_log level. OpenSSL 1.1.1 used code 1417A0C1.
OpenSSL (server side: nginx, Apache, Postfix, openssl s_server) — SSL_R_NO_SHARED_CIPHER
What it means
This is the server's view of a failed handshake: none of the cipher suites in the client's ClientHello is both enabled on the server and usable with the server's certificate key. The server then sends handshake_failure (alert 40) to the client. It appears in server logs, not in client output.
Why it happens
The cipher list does not fit the certificate's key type
commonAn ECDSA certificate with only ECDHE-RSA-* suites enabled (or an RSA certificate with only ECDHE-ECDSA-*) leaves no usable TLS 1.2 suite, so every TLS 1.2 client fails.
A hand-trimmed cipher list excludes real clients
commonLists reduced to one or two suites, or to CHACHA20 only, lock out clients (and monitoring tools) that prefer other modern suites.
Very old clients
occasionalClients limited to RSA key exchange, CBC or 3DES suites (old Java, embedded devices) cannot connect to a modern configuration; decide deliberately whether to support them.
How to fix it
- 1.
Check the certificate key against the suites
ECDHE-ECDSA-* suites need an ECDSA certificate, ECDHE-RSA-* an RSA one; servers with both certificates can list both families.
bash # ECDSA key + only ECDHE-RSA suites (or the reverse) leaves nothing usable openssl x509 -in server.pem -noout -text | grep 'Public Key Algorithm' openssl ciphers -v 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256' - 2.
List the suites the server really accepts
Enumerate them from outside and compare with the clients you need to support.
bash # Which TLS 1.2 suites does the server accept? (nmap needed) nmap --script ssl-enum-ciphers -p 443 api.example.com - 3.
Use a well-tested suite list
Start from a generated modern or intermediate configuration rather than trimming lists by hand.
text # nginx: suites for both RSA and ECDSA certificates, TLS 1.3 enabled ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;