What the alerts mean#
TLS ends a failed negotiation with an alert, and RFC 8446 defines what each one means:
protocol_version: the peer tried to negotiate a version that is recognised but not supported.handshake_failure: the sender could not negotiate an acceptable set of security parameters from the options available.insufficient_security: sent instead ofhandshake_failurewhen the server requires parameters more secure than the client supports.
OpenSSL-based clients print the alert they received as tlsv1 alert protocol version or sslv3 alert handshake failure; the sslv3 and tlsv1 prefixes are historical and do not name the version in use. These reasons are recorded when an alert arrives from the peer, so they tell you the other side refused. The side that refused often logs the more specific cause. An OpenSSL server, for example, logs no shared cipher. OpenSSL SSL error strings · OpenSSL alert handling
Four causes that produce them#
- The client is too old or pinned low. Its library cannot do the versions the server accepts, or its configuration sets a maximum. Node.js, for example, has
maxVersionandminVersionoptions; Python hasSSLContext.maximum_versionandminimum_version. Node.js TLS options · Python SSLContext versions - The server raised its minimum. A security policy change removes TLS 1.0 and 1.1, or allows only TLS 1.3. Clients that worked yesterday fail with
protocol_version. - No shared cipher. Both sides support TLS 1.2, but none of the client's TLS 1.2 cipher suites is on the server's list. The server sends
handshake_failure. - A middlebox interferes. A TLS-inspecting proxy or firewall between the two may not handle a version or extension. RFC 8446 records field measurements in which a significant number of middleboxes misbehaved when TLS 1.3 was negotiated. RFC 8446 middlebox compatibility mode
A server that requires SNI and gets none can also fail the handshake, so rule that out with the SNI comparison. A server that demands a client certificate sends different alerts: see mutual TLS client certificate rejected.
Offer one version at a time#
From the failing host or container, try each version separately. -tls1_2 and -tls1_3 limit s_client to that version. A successful run prints a line ending in Cipher is with the negotiated suite, and a Protocol line with the version. openssl s_client
for v in -tls1_2 -tls1_3; do
echo "== $v"
openssl s_client -connect orders.example.com:443 -servername orders.example.com $v \
</dev/null 2>&1 | grep -E 'Protocol|Cipher is|alert|no protocols|unsupported protocol'
done
If TLS 1.2 fails with handshake_failure but your OpenSSL can do TLS 1.3, test cipher suites. -cipher sets the TLS 1.2 list and -ciphersuites the TLS 1.3 list. Use the exact list your client is configured with, so the test offers what the client offers. openssl s_client -cipher · openssl ciphers
openssl s_client -connect orders.example.com:443 -servername orders.example.com \
-tls1_2 -cipher 'ECDHE-RSA-AES128-GCM-SHA256' </dev/null 2>&1 | grep -E 'Cipher is|alert'
Then check what the client can do. The library version and the TLS settings in the client's configuration answer it; s_client on the host only proves what the host's OpenSSL can do.
Finally, repeat the first test from a second network position: a host in the dependency's network, or one that bypasses the proxy. A handshake that succeeds there and fails through the proxy points at the proxy.
When the dependency sits behind an AWS load balancer#
An Application Load Balancer's HTTPS listener negotiates with the protocols and ciphers of its security policy. AWS publishes which versions each policy allows: ELBSecurityPolicy-TLS13-1-3-2021-06 allows only TLS 1.3, ELBSecurityPolicy-TLS13-1-2-2021-06 allows TLS 1.2 and 1.3, and ELBSecurityPolicy-2016-08 allows TLS 1.0 through 1.2. A listener created through the CLI, CloudFormation or the CDK without a policy gets ELBSecurityPolicy-2016-08; the console's default differs. ALB security policies
Read the listener's policy and the policy's protocols. These calls only describe. describe-listeners · describe-ssl-policies
aws elbv2 describe-listeners \
--profile PROFILE --region REGION --load-balancer-arn LOAD_BALANCER_ARN \
--query 'Listeners[].{port:Port,protocol:Protocol,policy:SslPolicy}' \
--output table --no-cli-pager
aws elbv2 describe-ssl-policies \
--profile PROFILE --region REGION --names POLICY_NAME \
--query 'SslPolicies[0].{protocols:SslProtocols,ciphers:Ciphers[].Name}' \
--output json --no-cli-pager
If connection logs are enabled on an Application Load Balancer, each entry records the TLS protocol and cipher of the connection, which shows when old-version clients stopped connecting. ALB connection logs
Read the result#
| s_client from the failing host | From another position | Points to |
|---|---|---|
| Fails at the client's version, passes at a newer one | Same | Server floor above the client |
| Fails at every version with handshake_failure | Same | No shared cipher, or server config |
| Passes at the client's version | Same | Client library or its settings |
| Fails | Passes | Middlebox on the failing path |
A worked example with two outcomes#
This example is illustrative. On Monday, calls from checkout to payments.example.com fail with tlsv1 alert protocol version. orders calls the same endpoint without errors.
In the first outcome, the payments listener's policy changed on Friday from ELBSecurityPolicy-TLS13-1-2-2021-06 to ELBSecurityPolicy-TLS13-1-3-2021-06. s_client with -tls1_3 succeeds and with -tls1_2 fails. checkout sets maxVersion: 'TLSv1.2' in its TLS options, left over from an old workaround. orders does not. Either checkout removes the cap or payments restores a policy that allows TLS 1.2.
In the second outcome, both s_client runs succeed from a host in the payments VPC, and both fail from the checkout subnet, whose egress passes through an inspecting proxy. Nothing changed on the payments listener. The proxy received an update on Sunday, and its owners are the team to call.
Limits#
s_client shows what your OpenSSL build can negotiate. A service on another library, or with its own cipher configuration, can fail where s_client succeeds. Copy the service's exact settings into the test before concluding.
Load balancers and CDNs can apply different policies per listener, per port or per hostname. Test the exact name and port the service calls. For other layers, see the hub for runtime dependency failures.
Questions#
Why does the error say sslv3 when I use TLS 1.2?
OpenSSL kept the names of its alert reason strings from older protocol versions. sslv3 alert handshake failure means a handshake_failure alert arrived; it does not mean SSL 3.0 was negotiated.
Which side should I ask for logs?
The side that sent the alert decided to refuse, and its logs usually name the cause, such as no shared cipher or an unsupported version. A client error that says "alert" means the server sent it.
Is TLS 1.3 required by AWS load balancers?
Only if the listener's policy allows nothing else. Read the listener's policy and its protocol list; several policies allow TLS 1.2 as well.