About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
A handshake that ends with "handshake failure" means the client and server could not agree on an acceptable set of security parameters. In practice that is a TLS version or a cipher suite that only one side offers. You can see it from the client as sslv3 alert handshake failure and SSL alert number 40, or from a Windows server as a Schannel event such as 36874 or 36888.
This article covers version and cipher mismatches only. If the handshake completes and the problem is an expired or untrusted certificate, that is a different fault.
What the error means
RFC 8446 (TLS 1.3, August 2018) defines three alerts that end a failed negotiation:
handshake_failure(40): "the sender was unable to negotiate an acceptable set of security parameters given the options available."protocol_version(70): the version the peer tried is recognised but not supported.insufficient_security(71): sent instead of handshake_failure "when a negotiation has failed specifically because the server requires parameters more secure than those supported by the client."
The same RFC says a server must abort with handshake_failure or insufficient_security when there is no overlap in the key-exchange groups. So "no shared cipher" is not the only way to get alert 40; a missing common group or signature algorithm produces the same alert.
OpenSSL words alert 40 as sslv3 alert handshake failure. A mailing-list post (OpenSSL 1.1.0l, November 2020) shows the shape of a failed s_client run: sslv3 alert handshake failure, SSL alert number 40, no peer certificate available, and Cipher is (NONE). The same output lists Protocol : TLSv1.2, and the poster saw it with -tls1_2 as well, so the sslv3 in the text is not a sign that SSL 3.0 was used.
A second form is local. The client's own OpenSSL refuses to offer anything the server would accept, and no packet reaches the server. A maintainer answer in OpenSSL discussion 21356 (OpenSSL 3.1.0) shows error:0A0000BF:SSL routines:tls_setup_handshake:no protocols available and explains that, by default, only TLS 1.2 and above are enabled. This is maintainer guidance in a community thread, not product documentation.
On the Windows side, Microsoft's Schannel event table (archived, last updated 2017-06-29, written for Vista to Server 2012) describes four relevant events:
- 36873: no supported cipher suites were found when initiating a connection (client role).
- 36874: a connection request was received but none of the client's cipher suites are supported by the server.
- 36887: a fatal alert was received.
- 36888: a fatal alert was generated.
The archived 36874 message reads "An SSL 3.0 connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server." Read the protocol named in your own event instead of assuming it matches that wording.
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| Client only offers a protocol version the server has disabled | Alert 40 or 70 from the server; Schannel 36874 on a Windows server | s_client with -tls1_2 works where the client's own version fails; the server's SCHANNEL Protocols keys |
| A protocol is switched off on the server or client role | Same as above, only for some clients | Enabled value under ...\SCHANNEL\Protocols\<version>\Server or \Client |
| No common cipher suite | Alert 40; 36874 or 36873 | Get-TlsCipherSuite on the Windows host against what the client offers; -cipher or -ciphersuites test |
| Server cipher order set by policy and trimmed | Only clients with older suites fail | Policy key takes precedence over the local key (see below) |
| Local OpenSSL security level refuses legacy settings | no protocols available before any traffic |
s_client works with -cipher DEFAULT:@SECLEVEL=0 |
| No common key-exchange group or signature algorithm (TLS 1.3) | Alert 40 or 71 although versions and suites look compatible | RFC 8446 behaviour; confirm with a packet capture of the ClientHello and the alert |
| Problem cipher suite negotiated, then fatal alert 20 | 36888 "fatal alert was generated: 20. The internal error state is 960" | Capture shows TLS_DHE_RSA_WITH_AES_128_CBC_SHA or the 256 variant in the Server Hello |
Prove the cause before changing anything
These commands are taken from the vendors' documentation and have not been run or lab-tested.
1. Look at the failure from a client. The s_client page documents -connect host:port, -servername (the SNI value), -brief ("only provide a brief summary of connection parameters"), and the version options -tls1_2, -tls1_3, -tls1_1, -no_tls1_2 and so on.
openssl s_client -connect web01.example.internal:443 -servername web01.example.internal -brief
Bad result: an alert line such as sslv3 alert handshake failure or SSL alert number 40, and Cipher is (NONE). Good result: the connection reports a negotiated protocol and a real cipher name. The OpenSSL page documents the options but does not print a sample of a good run, so judge by that.
2. Pin one version at a time.
openssl s_client -connect web01.example.internal:443 -servername web01.example.internal -brief -tls1_2
openssl s_client -connect web01.example.internal:443 -servername web01.example.internal -brief -tls1_3
If TLS 1.2 succeeds and the application's own version fails, the server is fine and the application is the old side. If both fail, the server's protocol or cipher configuration is the first suspect.
3. Test ciphers. -cipher changes the TLS 1.2 and below list; -ciphersuites changes the TLS 1.3 suites. Offer the single suite your application is known to use. If the server accepts it, the application is not sending it.
4. Rule out the local OpenSSL. If you see no protocols available, the failure is local. The security level page says level 1 is the library default if not set at build time, and that level 1 forbids signatures using SHA1 and MD5. Level 0 permits everything. A diagnostic run with -cipher DEFAULT:@SECLEVEL=0 (the maintainer's suggestion) tells you whether the security level is the blocker. Use it for the test only.
5. On the Windows server, read the event. In Event Viewer open Windows Logs, System, and filter for source Schannel. Microsoft's support blog says these errors show up in the System event log. Note the event ID, the protocol named in the message and, for 36887 or 36888, the alert number in the text. Alert 40 is handshake_failure in RFC 8446.
If the events are missing, Schannel logging may be set low. The TLS registry settings page (2025-04-18) puts it under HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL, value EventLogging, levels 0 to 7 (3 is error and warning events), and says a reboot is required after changing it. Raising the level is a change; do it in a maintenance window.
6. Read the server's protocol and cipher settings.
Get-TlsCipherSuite
Get-TlsCipherSuite -Name AES
Get-TlsCipherSuite lists the suites in order and, for each, a Protocols field. The name match is case-sensitive. In Registry Editor, read ...\SCHANNEL\Protocols\TLS 1.2\Server (and the other versions, and \Client). A value Enabled of 1 enables the version and 0 disables it, per the registry page. Read, do not edit.
For the cipher order, the support blog names two keys: HKLM\SYSTEM\CurrentControlSet\Control\Cryptography\Configuration\Local\SSL\00010002 and the policy key HKLM\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002. The policy key wins, and is blank when no policy exists. In Group Policy, the setting is Computer Configuration, Administrative Templates, Network, SSL Configuration Settings, SSL Cipher Suite Order (Manage TLS).
7. Capture if still unclear. The support blog's method is a network trace that lines up with the errors; open the Server Hello to see the cipher suite chosen. A trace also shows whether the ClientHello offered the group and signature algorithms the server needs, which no event log will tell you.
Fix
Change the side that is out of date. Raising the client is almost always safer than lowering the server.
Cause: old client library or application. Update the client's TLS library, or configure the application to offer TLS 1.2 or later, rather than changing the server. No server risk.
Cause: protocol disabled on a Windows server you must keep reachable for a legacy client. Under ...\SCHANNEL\Protocols\<version>\Server, create a DWORD Enabled with value 1. Risk: Microsoft's page recommends not editing the registry directly unless there is no alternative, warns that changing enabled versions "could break interoperability", and says changes apply to connections that use credential handles acquired after the change, so "an application, or service restart might be required." Enabling an older protocol widens what the server accepts; treat it as temporary. Back out: export the key first, then restore the old value or delete the new one and restart the service.
Cause: cipher order trimmed by policy. Add the needed suite to the SSL Cipher Suite Order setting. The list must be strictly comma-delimited and is limited to 1,023 characters. Disruptive step: "Changes to the TLS cipher suite order take effect on the next boot," so schedule a reboot. Microsoft also states that updating the registry for the default priority order is not supported and may be reset by servicing updates, so use policy. Back out: restore the previous policy text and reboot.
Cause: problem DHE suites with alert 20. The support blog (written for Windows Server 2008 R2 to 2012 R2) advises removing TLS_DHE_RSA_WITH_AES_128_CBC_SHA and the 256 variant, then moving the TLS_RSA_WITH_AES suites to the top if it persists, with a reboot after each change, and setting the order through policy so hotfixes do not add the suites back. Risk: the advice is dated, so apply it only if your capture shows those suites and alert 20.
Cause: local security level (test client). For a diagnostic, use -cipher DEFAULT:@SECLEVEL=0. Do not lower the level in an application's configuration to make a production connection work; replace the legacy server or client instead.
Confirm the fix
- Repeat the exact
s_clientcommand from step 1. The output should show a negotiated protocol and a real cipher, notCipher is (NONE). - Run the real application's connection and check it completes.
- In the Windows System log, confirm no new Schannel 36874, 36887 or 36888 events for the client's address after the change.
- If you changed a protocol value, confirm the service was restarted so new handshakes use it.
What to watch afterwards
- Schannel 36874, 36887 and 36888 counts in the System log. A single legacy client coming back shows here first.
- Group Policy drift: a cipher order set directly in the registry can be reset by updates, as Microsoft warns.
- New clients and libraries after upgrades; an upgrade of a client's OpenSSL can start refusing a server that used to work (the 3.1.0 thread is the example).
- If you raised the Schannel logging level, lower it again when finished, with another reboot.
Example (illustrative): scan01, a legacy monitoring agent, starts failing against web01, a Windows host that only allows TLS 1.2. From an admin workstation, openssl s_client -connect web01.example.internal:443 -servername web01.example.internal -brief -tls1_2 succeeds, so the server is serving TLS 1.2. The System log on web01 shows Schannel 36874 for each scan. The agent's vendor ships a version with TLS 1.2 support; once it is installed, the events stop. The alternative, enabling an old protocol on web01, was rejected because it widens the server for every client.
Read next
Related articles you may want next.
- HostingRenew IIS TLS Certificates and Verify the Live EndpointMap TLS termination, renew the correct certificate and validate trust and hostname from real client paths before retiring the old certificate.Read article
- HostingMutual TLS between application tiers in a hosted environmentWhen mutual TLS between web, application and integration tiers is worth the operational cost in a hosted estate, and what breaks if trust or names drift.Read article
- HostingShorter TLS certificate lifetimes: the 2026 to 2029 schedule and what to automateThe CA/Browser Forum schedule cutting TLS certificate lifetimes to 200, 100 and 47 days, and how to decide which renewals to automate first.Read article
Risks and limits
- Microsoft's Schannel event table is archived and written for Windows Vista to Server 2012; message wording on current Windows may differ, and Microsoft's current registry page documents the settings but not those event messages.
- No OpenSSL documentation page explains
no protocols available; the explanation comes from a maintainer's answer about 3.1.0. The security level page describes the library's built-in default; a packaged build can be compiled with a different one. - The support blog's cipher advice was written for Windows Server 2008 R2 to 2012 R2.
Get-TlsCipherSuitelists suites known to the machine and their order; it does not show what a specific client offered.- This article does not cover certificate trust, expiry or name mismatch.
Sources
- openssl-s_client — OpenSSL project, date not shown, accessed 17 November 2026
- SSL_CTX_set_security_level — OpenSSL project, date not shown, accessed 17 November 2026
- OpenSSL 3.1.0 does not support DTLS-1.0 by default (discussion 21356) — OpenSSL project on GitHub, 26 April 2023, accessed 17 November 2026
- openssl s_client connection fails — openssl-users mailing list, 18 November 2020, accessed 17 November 2026
- RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3 — IETF, August 2018, accessed 17 November 2026
- Schannel Events (archived) — Microsoft Learn, last updated 2017-06-29, accessed 17 November 2026
- Transport Layer Security (TLS) Handshake Failing, SChannel Error 36888 — Microsoft Learn, last updated 2016-11-11, accessed 17 November 2026
- TLS registry settings — Microsoft Learn, last updated 2025-04-18, accessed 17 November 2026
- Manage Transport Layer Security (TLS) — Microsoft Learn, last updated 2025-04-18, accessed 17 November 2026
- Get-TlsCipherSuite — Microsoft Learn, date not shown, accessed 17 November 2026
This article was originally published on .