What sslv3 alert handshake failure, ssl/tls alert handshake failure and tlsv1 alert protocol version mean, how to tell which side refused the handshake, and how to test TLS versions, ciphers and SNI with openssl s_client and curl.
Home › Guides › SSL handshake failure
Last updated 18 November 2026
Any OpenSSL error with alert in its name means the other side sent a TLS alert and ended the handshake. OpenSSL turns a received alert number N into reason code 1000 + N and adds SSL alert number N to the error. So the real reason is usually in the other side's log.
alert handshake failure (alert 40): the peer couldn't agree on an acceptable set of security parameters. Common causes: no cipher suite in common, a missing or wrong server name (SNI), or a client certificate the server wanted.tlsv1 alert protocol version (alert 70): the peer recognises the TLS version you offered but doesn't support it. Usually an old client offering only TLS 1.0 or 1.1, or a client forced to a version the server has turned off.Find which TLS versions and ciphers each side allows, then upgrade the old side. Don't fix it by re-enabling TLS 1.0 or 1.1 on the server.
| OpenSSL text | Code (OpenSSL 3.x / 1.1.1) | Alert | Meaning (RFC 8446 section 6.2) |
|---|---|---|---|
ssl/tls alert handshake failure (OpenSSL 3.2 and later), sslv3 alert handshake failure (3.1 and earlier, including 1.1.1) | 0A000410 / 14094410 | handshake_failure (40) | The sender was unable to negotiate an acceptable set of security parameters given the options available. |
tlsv1 alert protocol version | 0A00042E / 1409442E | protocol_version (70) | The protocol version the peer attempted to negotiate is recognized but not supported. |
tlsv1 alert insufficient security | 0A00042F | insufficient_security (71) | Sent instead of handshake_failure when the server requires parameters more secure than those the client supports. |
tlsv1 unrecognized name | 0A000458 | unrecognized_name (112) | Sent by servers when no server exists for the name the client gave in the server_name (SNI) extension (RFC 6066). |
The same handshake failure looks like this in curl (8.14.1 with OpenSSL 3.5.7), exit code 35:
curl: (35) TLS connect error: error:0A000410:SSL routines::ssl/tls alert handshake failure curl: (35) TLS connect error: error:0A00042E:SSL routines::tlsv1 alert protocol version
and like this in openssl s_client (OpenSSL 3.5.7):
...:error:0A000410:SSL routines:ssl3_read_bytes:ssl/tls alert handshake failure:...:SSL alert number 40 ...:error:0A00042E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version:...:SSL alert number 70
OpenSSL 1.1.1 shows the function name in the middle: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure. The "sslv3" and "tlsv1" in these strings are historical names for the alert, not the version you connected with.
The side that sends the alert logs its own, more specific reason. In tests with an OpenSSL 3.5.7 server:
| What happened | Client saw | Server logged |
|---|---|---|
| Client offered only TLS 1.2, server allows only TLS 1.3 (or the reverse) | tlsv1 alert protocol version | unsupported protocol (0A000102) |
| No TLS 1.2 cipher suite in common | ssl/tls alert handshake failure | no shared cipher (0A0000C1) |
Client asked for a version its own configuration doesn't allow (here openssl s_client -tls1) | no protocols available (0A0000BF), nothing sent | nothing |
If the server is yours, read its error log at the time of the failed connection. If it isn't, test from the client side as below and compare with what the server accepts.
# What does a default handshake negotiate? openssl s_client -connect www.example.com:443 -servername www.example.com -brief </dev/null # Force one version at a time openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_2 -brief </dev/null openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_3 -brief </dev/null # Try one TLS 1.2 cipher, or TLS 1.3 cipher suites openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_2 -cipher ECDHE-RSA-AES128-GCM-SHA256 </dev/null openssl s_client -connect www.example.com:443 -servername www.example.com -tls1_3 -ciphersuites TLS_AES_128_GCM_SHA256 </dev/null # The same with curl curl -sv --tlsv1.2 --tls-max 1.2 https://www.example.com/ -o /dev/null curl -sv --tlsv1.3 https://www.example.com/ -o /dev/null
In s_client, -cipher sets the TLS 1.2 and earlier cipher list and -ciphersuites sets the TLS 1.3 suites (a colon-separated list). In curl, --tlsv1.2 means "TLS 1.2 or later" and --tls-max sets the highest version, so the pair above forces exactly TLS 1.2. For mail servers add -starttls smtp (or imap, pop3) on STARTTLS ports. If you get wrong version number instead of an alert, the port isn't speaking TLS at all; see SSL wrong version number.
To test SNI, compare a handshake with and without the name. s_client fills in SNI from -connect when it is a DNS name (the default since OpenSSL 1.1.1); connecting by IP address sends no SNI unless you add -servername, and -noservername turns it off:
openssl s_client -connect 203.0.113.10:443 -servername www.example.com -brief </dev/null openssl s_client -connect 203.0.113.10:443 -noservername -brief </dev/null
RFC 8996 deprecated TLS 1.0 and 1.1: "TLS 1.0 MUST NOT be used" and "TLS 1.1 MUST NOT be used". Current server defaults follow that:
ssl_protocols TLSv1.2 TLSv1.3; (TLSv1.3 has been in the default since nginx 1.23.4).SSLProtocol all -SSLv3, so which versions are actually offered also depends on the OpenSSL build and its configuration.The fix is on the old side: update the client library, runtime, firmware or OS so it speaks TLS 1.2 or 1.3. The reverse case also exists: a client forced to TLS 1.3 only (for example curl --tlsv1.3) against a server that stops at TLS 1.2.
The server picks a cipher suite from the client's list; if none of them is enabled on the server, it sends handshake_failure and logs no shared cipher. Typical cases: an old client whose only cipher suites are ones the server has disabled, a hardened server cipher list, or a server certificate type (RSA or ECDSA) that doesn't match any suite the client offers for TLS 1.2. Compare lists with openssl ciphers -v 'ALL' on the client and the server's configured list (nginx ssl_ciphers, default HIGH:!aNULL:!MD5; Apache SSLCipherSuite). The OpenSSL cipher string @SECLEVEL=n changes the security level, which also removes weak parameters; see SSL_CTX_set_security_level(3) for what each level excludes.
Servers that host several names on one IP use SNI to pick the certificate. nginx notes that SNI is mandatory to implement in TLS 1.3 but may not be used by some old or special clients. A server can reject handshakes for names it doesn't serve: nginx's ssl_reject_handshake on; in the default server rejects handshakes for any other name, and RFC 8446 defines unrecognized_name for this case. If the handshake works with -servername and fails with -noservername, the client isn't sending SNI (common with scripts that connect by IP); fix the client to send the hostname.
With mutual TLS the server may end the handshake if the client sends no certificate. TLS 1.3 defines a separate alert for this, certificate_required (116), "sent by servers when a client certificate is desired but none was provided by the client"; OpenSSL shows it as tlsv13 alert certificate required. In TLS 1.2, RFC 5246 lets a server that gets no client certificate either continue without client authentication or respond with a fatal handshake_failure alert, so on TLS 1.2 the same problem shows up as alert 40. Test with openssl s_client -cert client.pem -key client.key ....
The Bulk SSL Certificate Expiry Monitor on Apify handshakes with each host and port (STARTTLS automatically on 25, 587, 143, 110 and 21) and reports the negotiated TLS version and cipher with the certificate. Endpoints that fail the handshake come back as ERROR with the OpenSSL reason, so one run across your servers shows which ones still need TLS 1.2 or a cipher change ($1 per 1,000 endpoints).
Check the certificate a server issues with the SSL Certificate Checker, look up A, AAAA and CAA records with DNS Lookup, confirm DNS changes with the DNS Propagation Checker, see who operates the IP behind a name with the ASN IP Lookup and Cloud IP Lookup, check mail hosts with the MX Record Lookup and MTA-STS Checker, and get TLS failure reports for your mail domain with the TLS-RPT Record Generator. Related guides: SSL wrong version number, SSL certificate name mismatch, unable to get local issuer certificate, SSL unexpected eof while reading and MTA-STS and TLS-RPT setup.
The other side sent TLS alert 40, handshake_failure: it could not agree on an acceptable set of security parameters. The sslv3 part is a historical name; OpenSSL 3.2 and later print ssl/tls alert handshake failure instead. Check for no common cipher suite, missing SNI or a required client certificate.
The other side sent alert 70, protocol_version: it recognised the TLS version you offered but does not support it. Most often an old client offers only TLS 1.0 or 1.1 to a server that allows TLS 1.2 and 1.3, which RFC 8996 requires. Update the client rather than re-enabling old versions.
Run openssl s_client -connect host:443 -servername host with -tls1_2 and then -tls1_3, or curl with --tlsv1.2 --tls-max 1.2 and --tlsv1.3. A version that fails with an alert is not enabled on the server.
The script may use an older TLS library, a restricted cipher list or connect by IP address without sending SNI. Compare openssl s_client with and without -servername, and check which TLS versions and ciphers the script's library offers.
Exit code 35 is CURLE_SSL_CONNECT_ERROR, any failure during the TLS handshake. Read the OpenSSL text after it: alert handshake failure and alert protocol version come from the server, while wrong version number means the port is not speaking TLS.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.