Err SSL Version or Cipher Mismatch: Fix TLS Handshake Errors
The err ssl version or cipher mismatch error means the TLS client and server could not agree on a protocol version or cipher suite during the handshake; in Chrome this appears as ERR_SSL_VERSION_OR_CIPHER_MISMATCH and in OpenSSL as sslv3 alert handshake failure or no shared cipher. Check both sides: TLS 1.0 and TLS 1.1 are deprecated by RFC 8996, so a client limited to TLS 1.0 against a server set to ssl_protocols TLSv1.2 TLSv1.3 will fail even with a valid certificate. Use openssl s_client -connect example.com:443 -servername example.com -tls1_2 and -tls1_3 to confirm overlap; inspect Protocol and Cipher lines, not just Verify return code: 0. For Nginx 1.20+, set 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'; ssl_prefer_server_ciphers off; then reload with nginx -t && systemctl reload nginx. Legacy clients that require TLS 1.0/1.1 or 3DES/RC4 need a separate listener or proxy; do not lower the main site below TLS 1.2 per Mozilla SSL Configuration Generator.
What Does err ssl version or cipher mismatch Mean in a TLS Handshake?
The err ssl version or cipher mismatch is not an HTTP error at all — it is a negotiation failure that happens in the first round trip of the TLS handshake. The client opens with a ClientHello carrying a supported_versions extension (TLS 1.3, per RFC 8446 §4.2.1) or the legacy client_version field plus cipher_suites (TLS 1.2, per RFC 5246 §7.4.1.2). The server must pick exactly one overlapping version and one overlapping suite and echo them in the ServerHello. If the intersection is empty, the server sends a fatal alert — protocol_version (70) or handshake_failure (40) — and tears the connection down before a single byte of HTTP is written.
That is why a server offering only TLS 1.2 and a client offering only TLS 1.0 produce the same symptom class: there is nothing to select.
| Client / stack | What you actually see | Where it appears |
|---|---|---|
| Chrome / Edge (BoringSSL) | ERR_SSL_VERSION_OR_CIPHER_MISMATCH |
Browser error page |
| Firefox (NSS) | SSL_ERROR_NO_CYPHER_OVERLAP |
Browser error page |
OpenSSL 1.1.1 / 3.x s_client |
sslv3 alert handshake failure or no shared cipher |
stdout |
| curl (OpenSSL backend) | error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure |
exit code 35 |
| Java (JSSE) | javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure |
Stack trace |
A valid certificate cannot rescue this. Per Let’s Encrypt’s documentation, a certificate proves identity and anchors trust; it does not participate in protocol or cipher selection, because certificate validation happens after the ServerHello. A brand-new Let’s Encrypt cert on a TLS 1.2-only virtual host will still fail against a TLS 1.0-only Windows 7 or Android 4.4 client. Three triggers dominate: a server that dropped TLS 1.0/1.1 while legacy clients still require it; a cipher list that excludes the client’s sole option (often AES128-SHA or DES-CBC3-SHA); and an ECDSA-only certificate paired with a cipher list permitting only ECDHE-RSA-* suites.
Before changing anything, fingerprint both sides — modern TLS 1.3 stack or legacy TLS 1.0 endpoint:
# Client-side stack and build flags
openssl version -a
# Server-side: which TLS versions and ciphers are actually compiled/configured
nginx -V 2>&1 | tr ' ' 'n' | grep -Ei 'ssl|tls'
apache2ctl -M | grep ssl # Debian/Ubuntu; use httpd -M on RHEL
java -version # JSSE defaults differ between 8 and 17
# Probe the endpoint with a deliberately narrow offer
openssl s_client -connect example.com:443 -servername example.com -tls1_2
-cipher 'AES128-SHA' </dev/null
If that probe returns no shared cipher, the server has no matching suite; if it returns alert protocol version, the version intersection is empty. Either way, you have localised the err ssl version or cipher mismatch to configuration rather than DNS, firewall, or certificate expiry.
Why Does err ssl version or cipher mismatch Happen? Root Causes and Defaults
Why does a browser show ERR_SSL_VERSION_OR_CIPHER_MISMATCH when DNS and the certificate are fine? Because the handshake never got far enough to use the certificate. That Chrome/Edge error string (Firefox says SSL_ERROR_NO_CYPHER_OVERLAP, curl says error:0A000102:SSL routines::unsupported protocol) is emitted during ClientHello/ServerHello negotiation — protocol version or cipher list — not during certificate validation. Four things cause almost every case.
1. Protocol-version mismatch. RFC 8996 (March 2021) formally deprecates TLS 1.0 and 1.1, and the Mozilla SSL Configuration Generator now emits ssl_protocols TLSv1.2 TLSv1.3; as the “Intermediate” default. If your server enforces that and a client (old Android WebView, embedded device, Java 6/7 client, WinHTTP on legacy Windows) offers only TLS 1.0, the server returns a fatal protocol_version alert and the browser surfaces err ssl version or cipher mismatch. Reproduce it directly:
# Force TLS 1.0 — this is what the failing client does
openssl s_client -connect example.com:443 -servername example.com -tls1
# → error:0A000102:SSL routines::unsupported protocol (OpenSSL 3.x)
# Confirm what the server actually offers
openssl s_client -connect example.com:443 -servername example.com &1 | grep -E 'Protocol|Cipher'
# Protocol : TLSv1.3
# Cipher : TLS_AES_256_GCM_SHA384
nmap --script ssl-enum-ciphers -p 443 example.com # lists per-version cipher support
2. Cipher-suite mismatch. TLS 1.3 defines exactly five cipher suites in RFC 8446 §B.4, and they are negotiated separately from the ssl_ciphers string. TLS 1.2 still needs ECDHE with AES-GCM or ChaCha20; a client offering only 3DES, RC4, or static-RSA suites hits sslv3 alert handshake failure / “no shared cipher” in the server log.
| Item | TLS 1.2 | TLS 1.3 |
| Suites | ECDHE-RSA-AES128-GCM-SHA256, ECDHE-ECDSA-CHACHA20-POLY1305, … | TLS_AES_128_GCM_SHA256, TLS_AES_256_GCM_SHA384, TLS_CHACHA20_POLY1305_SHA256, TLS_AES_128_CCM_SHA256, TLS_AES_128_CCM_8_SHA256 |
| Nginx control | ssl_ciphers |
ssl_conf_command Ciphersuites … (nginx ≥ 1.19.4) |
| Key exchange | Separate (ECDHE/DHE) | Always ephemeral, built into suite |
3. Certificate key type vs. cipher list. ECDHE-ECDSA-AES128-GCM-SHA256 needs an ECDSA certificate; ECDHE-RSA-AES128-GCM-SHA256 needs RSA. A TLS 1.2 client that only accepts RSA suites facing an ECDSA-only cert gets “no shared cipher”. Check with openssl x509 -in cert.pem -noout -text | grep 'Public Key Algorithm' before editing ciphers.
4. Middleboxes and OpenSSL security levels. A CDN may pin a minimum TLS 1.2, and an AWS ALB security policy such as ELBSecurityPolicy-TLS13-1-2-2021-06 restricts suites at the edge; a load balancer may then re-encrypt to an origin with a different list, so test every hop with openssl s_client -connect host:443 -servername host. Locally, OpenSSL 3.0 defaults to @SECLEVEL=1; @SECLEVEL=2 silently drops 1024-bit RSA and SHA-1 — run openssl ciphers -v 'DEFAULT@SECLEVEL=2' | wc -l to see the effective list rather than trusting the configured string.
How Do You Fix err ssl version or cipher mismatch Step by Step?
Reproduce the failure with a client you control before touching the server, because “err ssl version or cipher mismatch” is a symptom with three distinct root causes and each one needs a different fix.
# 1. Force each protocol version and watch for "alert protocol version" vs "no shared cipher"
openssl s_client -connect example.com:443 -servername example.com -tls1_2
openssl s_client -connect example.com:443 -servername example.com -tls1_3
# 2. Pin a single suite to expose an RSA/ECDSA key-type mismatch
openssl s_client -connect example.com:443 -servername example.com
-cipher 'ECDHE-RSA-AES128-GCM-SHA256'
Read the Protocol : and Cipher : lines in the session block, then the trailing alert. alert protocol version means no common TLS version; no shared cipher (OpenSSL alert 40) means versions agree but suites don’t; a bare handshake failure usually means the server has no certificate matching the offered key type.
| openssl output | Root cause | Fix layer |
|---|---|---|
alert protocol version |
Client capped at TLS 1.0/1.1, server requires 1.2+ | Client JRE / OS policy |
no shared cipher |
Over-narrow ssl_ciphers or missing CHACHA20/GCM suites |
Server cipher list |
handshake failure on ECDSA suite |
RSA cert served, ECDSA suite offered | Certificate / suite pairing |
Next, prove whether the constraint is client-side. For Java, java -version plus -Djdk.tls.client.protocols=TLSv1.2 reveals a JRE pinned to legacy defaults; for OpenSSL, openssl version -a and openssl ciphers -v 'DEFAULT' show what the local stack will even offer. For fleet-wide discovery, nmap --script ssl-enum-ciphers -p 443 example.com lists accepted versions and suites per version.
nginx -T | grep -E 'ssl_protocols|ssl_ciphers|ssl_prefer_server_ciphers'
apachectl -S; grep -R SSLProtocol /etc/apache2 /etc/httpd
haproxy -c -f /etc/haproxy/haproxy.cfg
Align protocol versions first. On Nginx 1.20+ use ssl_protocols TLSv1.2 TLSv1.3;; on Apache 2.4.43+ with OpenSSL 1.1.1 use SSLProtocol TLSv1.2 TLSv1.3. Re-enabling TLS 1.0/1.1 globally to silence an err ssl version or cipher mismatch trades a handshake error for PCI-DSS 4.0 non-compliance — if a legacy client truly needs it, isolate it on a separate listener.
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;
ssl_prefer_server_ciphers off; # modern default; TLS 1.3 suites are not affected by this directive
That list mirrors Mozilla’s “intermediate” recommendation and deliberately carries both ECDSA and RSA variants — drop one and you get a handshake failure on the half of clients that prefer the other. Ship it with a rollback path:
cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak
nginx -t && systemctl reload nginx # apachectl configtest && systemctl reload apache2
curl -sS -o /dev/null -w '%{http_code} %{ssl_verify_result}n' https://example.com
Verify immediately with openssl s_client at TLS 1.2 and 1.3 — a malformed cipher string fails nginx -t only sometimes, but it will silently break every handshake once reloaded, per the OpenSSL ciphers(1) man page’s note that unknown suite names abort the parse rather than warn.
err ssl version or cipher mismatch Config Examples for Nginx, Apache, OpenSSL, and Java
All four stacks below express the same policy: a TLS 1.2 floor plus TLS 1.3, ECDHE-only forward secrecy, and AES-GCM/ChaCha20-Poly1305 AEAD suites. That overlap is what eliminates err ssl version or cipher mismatch for any client shipped after ~2016 — the handshake fails only when the client’s offered list and the server’s configured list intersect at nothing, and RFC 5246 §7.4.1.1 requires the server to answer with a fatal handshake_failure (alert 40) in that case.
Nginx 1.20+ — note that ssl_ciphers has zero effect on TLS 1.3; per RFC 8446 §9.1 the 1.3 suites are negotiated by the client’s preference and controlled only via ssl_conf_command (needs OpenSSL 1.1.1+):
# /etc/nginx/conf.d/site.conf — Nginx 1.20+
server {
listen 443 ssl;
http2 on; # 1.25.1+; older: listen 443 ssl http2;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3; # also the 1.20+ default
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:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';
ssl_prefer_server_ciphers off; # default off since 1.0.0; lets modern clients choose
ssl_session_cache shared:SSL:10m; # ~40k sessions per 10 MB
ssl_session_timeout 1d;
# TLS 1.3 suites — ssl_ciphers cannot touch these (nginx 1.19.4+)
ssl_conf_command Ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256;
}
Apache 2.4.43+ on OpenSSL 1.1.1 mirrors it; SSLHonorCipherOrder off keeps client preference, matching the Mozilla “intermediate” profile:
# /etc/apache2/conf-enabled/ssl.conf — Apache 2.4.43+ / OpenSSL 1.1.1
SSLProtocol TLSv1.2 TLSv1.3
SSLCipherSuite 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
SSLHonorCipherOrder off
SSLOpenSSLConfCmd Ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
HAProxy 2.2+ uses ciphers for ≤1.2 and ciphersuites for 1.3 — the two keywords are not interchangeable, and a typo in either yields [ALERT] ... unknown keyword at config parse time rather than at handshake time:
# /etc/haproxy/haproxy.cfg — HAProxy 2.2+
global
ssl-default-bind-ciphersuites TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256
ssl-default-bind-options ssl-min-ver TLSv1.2
frontend https
bind :443 ssl crt /etc/ssl/site.pem alpn h2,http/1.1 ssl-min-ver TLSv1.2 ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384
# Always validate before reload — catches bad cipher names that later surface as err ssl version or cipher mismatch
haproxy -c -f /etc/haproxy/haproxy.cfg
| Concern | Nginx | Apache | HAProxy |
|---|---|---|---|
| TLS 1.2 suite list | ssl_ciphers |
SSLCipherSuite |
ciphers |
| TLS 1.3 suite list | ssl_conf_command Ciphersuites |
SSLOpenSSLConfCmd Ciphersuites |
ciphersuites |
| Protocol floor | ssl_protocols |
SSLProtocol |
ssl-min-ver |
| Server-side order | ssl_prefer_server_ciphers (off) |
SSLHonorCipherOrder (off) |
client order, no knob |
Prove the overlap with OpenSSL. Per the openssl-s_client man page, -servername is mandatory for SNI vhosts or you’ll test the wrong certificate and the wrong cipher list:
openssl ciphers -v 'ECDHE+AESGCM:ECDHE+CHACHA20' | head # what your build can actually offer
openssl s_client -connect example.com:443 -servername example.com -tls1_2
-cipher 'ECDHE-RSA-AES128-GCM-SHA256' # expect: Cipher is ECDHE-RSA-AES128-GCM-SHA256
openssl s_client -connect example.com:443 -servername example.com -tls1_1
# Correctly disabled 1.1 returns: "alert protocol version" / "SSL alert number 70"
# A cipher-list problem instead returns: "sslv3 alert handshake failure" / alert 40
Those two alert codes are the fastest triage signal: 70 means the protocol floor rejected the client; 40 means versions matched but suites didn’t.
Java client stopgap. If you can’t change the server today, pin the JVM to a suite your server still offers (JDK 11+ ignores https.cipherSuites for some stacks, so also check jdk.tls.disabledAlgorithms in $JAVA_HOME/conf/security/java.security):
java -Djdk.tls.client.protocols=TLSv1.2
-Dhttps.cipherSuites=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
-jar app.jar
# Without a fix: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
This is a client-side mitigation for err ssl version or cipher mismatch, not a substitute for correcting the server list — a JVM pinned to one suite will break again the moment that suite is retired. Cross-check your output against the Mozilla SSL Configuration Generator and Let’s Encrypt’s current chain defaults before you reload.
TLS Version vs Cipher Suite: Comparison Table for err ssl version or cipher mismatch
When a TLS handshake dies, the failure sits in one of two independent layers: the protocol version both peers can agree on, or the cipher suite both can use. Browsers surface both outcomes with the same vague message, which is why err ssl version or cipher mismatch is really two different bugs wearing one coat. The table below is the fastest way to see which side of the negotiation your server and client disagree on.
| Version | RFC | Status | Typical server setting | Notes |
|---|---|---|---|---|
| TLS 1.2 | RFC 5246 | Supported | TLSv1.2 |
Still needed by many Java 8 and older Android clients; required floor for compatibility. |
| TLS 1.3 | RFC 8446 | Preferred | TLSv1.3 |
Five AEAD cipher suites, no static RSA key exchange, 1-RTT by default. |
| TLS 1.1 | RFC 4346 | Deprecated by RFC 8996 | Usually disabled | Common cause of err ssl version or cipher mismatch for legacy clients. |
| TLS 1.0 | RFC 2246 | Deprecated by RFC 8996 | Usually disabled | Old Windows 7 / Java 6–7 stacks may still require it. |
| SSLv3 | RFC 6101 | Deprecated by RFC 7568 | Always disabled | POODLE; no modern stack should negotiate it. |
Version and cipher are negotiated separately, so a client can support TLS 1.2 and still fail because the only suites it offers are ones you disabled. TLS 1.3 suites are fixed by the RFC; TLS 1.2 suites are a menu you control.
- 代购 SSL 证书 · DigiCert / GeoTrust / RapidSSL 单域名与通配符
- HTTPS证书申请 · SSL证书安装部署 · 证书续费
- SSL证书申请 · SSL证书购买 · SSL证书安装配置
| TLS 1.2 suites (OpenSSL names) | TLS 1.3 suites | Why it matters |
|---|---|---|
ECDHE-RSA-AES128-GCM-SHA256 |
TLS_AES_128_GCM_SHA256 |
Forward secrecy via ECDHE; AEAD only. |
ECDHE-RSA-AES256-GCM-SHA384 |
TLS_AES_256_GCM_SHA384 |
Higher security margin, slightly more CPU. |
ECDHE-ECDSA-AES128-GCM-SHA256 |
TLS_CHACHA20_POLY1305_SHA256 |
ECDSA needs an EC certificate; ChaCha20 wins on mobile. |
ECDHE-RSA-CHACHA20-POLY1305 |
TLS_AES_128_CCM_SHA256 |
CCM variants exist mainly for constrained/IoT peers. |
AES128-SHA, DES-CBC3-SHA, RC4-SHA |
TLS_AES_128_CCM_8_SHA256 |
Legacy CBC/RC4 suites are the classic err ssl version or cipher mismatch trigger once removed. |
Defaults are not portable. Nginx 1.20 documents ssl_protocols defaulting to TLSv1 TLSv1.1 TLSv1.2 and ssl_ciphers to HIGH:!aNULL:!MD5; nginx 1.23.4 changed the protocol default to TLSv1.2 TLSv1.3. Apache 2.4’s effective set depends on the linked OpenSSL and SSLProtocol, whose default is all -SSLv3. Mozilla’s SSL Configuration Generator recommends a TLS 1.2 + TLS 1.3 floor for “intermediate” and “modern” profiles alike.
| Server | Effective default (typical distro) | Explicit setting |
|---|---|---|
| Nginx 1.20 | TLS 1.0–1.2, HIGH:!aNULL:!MD5 |
ssl_protocols TLSv1.2 TLSv1.3; |
| Apache 2.4 | all -SSLv3 (TLS 1.0+) |
SSLProtocol TLSv1.2 TLSv1.3 |
| HAProxy 2.2+ | Depends on OpenSSL build | bind *:443 ssl crt ... ssl-min-ver TLSv1.2 |
# Nginx: explicit floor + modern suites
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;
ssl_prefer_server_ciphers off; # let TLS 1.3 clients choose
# Apache 2.4
SSLProtocol TLSv1.2 TLSv1.3
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256
# HAProxy 2.2+
bind *:443 ssl crt /etc/ssl/site.pem ssl-min-ver TLSv1.2
# Verify what a client actually sees
openssl s_client -connect example.com:443 -tls1_2 -brief </dev/null
openssl s_client -connect example.com:443 -cipher 'AES128-SHA' -tls1_2 </dev/null
nmap --script ssl-enum-ciphers -p 443 example.com
OpenSSL’s security level is the hidden third variable: a suite you explicitly allowed can still be rejected at @SECLEVEL. OpenSSL 3.0 defaults to level 1, Ubuntu 22.04 ships DEFAULT:@SECLEVEL=2 in openssl.cnf, and RHEL 9’s DEFAULT crypto policy is level 2 — which is exactly why an OS upgrade can suddenly produce err ssl version or cipher mismatch on a config nobody touched.
| Level | Security bits | Rejects |
|---|---|---|
| 0 | none | Nothing — weak algorithms allowed, not recommended. |
| 1 | 80 | RC4, 3DES, export ciphers, MD5-signed certs. |
| 2 | 112 | RSA < 2048 bits, most SHA-1 signatures. |
| 3 / 4 | 128 / 192 | Increasingly strict key sizes and signature hashes. |
openssl ciphers -v 'DEFAULT@SECLEVEL=2' | wc -l # count suites still allowed
openssl ciphers -v 'AES128-SHA' # is the legacy suite gone?
If one legacy client genuinely needs TLS 1.0 or a CBC suite, don’t drop the main listener to @SECLEVEL=0 — publish a second virtual host or port with a separate certificate and cipher list, restrict it by IP, and log the SNI. Isolating the exception keeps the weak primitive off every other connection instead of reintroducing err ssl version or cipher mismatch risk for all users.
Common err ssl version or cipher mismatch Errors and How to Troubleshoot Them
Why does OpenSSL print “sslv3 alert handshake failure” when nobody is using SSLv3? Because the name is fossilized — TLS kept SSLv3’s alert record framing (RFC 8446 §6), so a server rejecting your TLS 1.0 ClientHello still emits alert 40 (handshake_failure, RFC 5246 §7.2). Force a single modern suite to learn who is actually wrong:
# -servername is mandatory for SNI vhosts; without it you test the default vhost
openssl s_client -connect example.com:443 -servername example.com
-tls1_2 -cipher 'ECDHE-RSA-AES128-GCM-SHA256'
# Success prints: Protocol: TLSv1.2 / Cipher: ECDHE-RSA-AES128-GCM-SHA256
# Verify return code: 0 (ok)
If that handshake completes, the server is fine and your client’s default cipher list or protocol floor is the real err ssl version or cipher mismatch. Note that OpenSSL 3.x reworded the identical failure as error:0A000410:SSL routines::sslv3 alert handshake failure, which sends people chasing 1.1.1-era strings that no longer appear.
What does “no shared cipher” in nginx error.log mean? Either ssl_ciphers excludes the client’s only suite, or the certificate key type doesn’t match the cipher family — an ECDSA-only cert can never serve ECDHE-RSA-* suites. Check both (nginx 1.23.4+ defaults: ssl_protocols TLSv1.2 TLSv1.3;, ssl_ciphers HIGH:!aNULL:!MD5;):
nginx -T 2>/dev/null | grep -nE 'ssl_(ciphers|protocols)'
openssl x509 -in /etc/nginx/ssl/cert.pem -text -noout | grep 'Public Key Algorithm'
# rsaEncryption -> keep ECDHE-RSA-* suites
# id-ecPublicKey -> add ECDHE-ECDSA-* suites
The Mozilla SSL Configuration Generator’s “intermediate” profile is a sound baseline because it lists both families explicitly rather than relying on HIGH.
Chrome shows ERR_SSL_VERSION_OR_CIPHER_MISMATCH but OpenSSL connects — why? That string only ever means “no shared protocol or cipher”; it is never a certificate-expiry message. Compare clients against the same hostname:
curl -v --tlsv1.2 --tls-max 1.2 https://example.com -o /dev/null
# --tls-max requires curl >= 7.54.0; read the "SSL connection using TLSv1.2 / ..." line
OpenSSL succeeding while Chrome fails points at the edge: a CDN minimum-TLS setting, an HSTS redirect to a host with a different policy, HTTP/2 (which requires TLS 1.2+ with forward-secret AEAD suites), or a middlebox terminating TLS. RC4/3DES-only endpoints fail in Chrome regardless of what curl negotiates.
Java: “The server selected protocol version TLS10 is not accepted by client preferences”? A textbook mismatch — since JDK 8u291 / 11.0.11, jdk.tls.disabledAlgorithms in java.security blocks TLS 1.0/1.1. Fix the server first; -Djdk.tls.client.protocols=TLSv1.2 only helps when the server truly offers TLS 1.2, otherwise you swap a clear exception for a connect timeout.
curl error 35 with ssl3_read_bytes:sslv3 alert handshake failure? Pin protocol and cipher together instead of disabling TLS 1.2:
curl -v --tlsv1.2 --tls-max 1.2
--ciphers ECDHE-RSA-AES128-GCM-SHA256 https://example.com
Invalid cipher string on reload? nginx logs SSL_CTX_set_cipher_list() failed (SSL: error:0A0000B1:SSL routines::no cipher match); Apache 2.4 refuses to start with AH02253: Unable to configure permitted SSL ciphers. Validate names against the library before touching production:
nginx -t
apachectl configtest
openssl ciphers -v | awk '{print $1}' | sort -u | grep -i gcm
| Error string | Where you see it | Root cause | First command |
|---|---|---|---|
| sslv3 alert handshake failure | openssl s_client, curl 35 | No shared protocol or cipher | s_client -tls1_2 -cipher ... |
| no shared cipher | nginx error.log | ssl_ciphers vs. cert key type | nginx -T | grep ssl_ciphers |
| ERR_SSL_VERSION_OR_CIPHER_MISMATCH | Chrome | CDN min TLS, middlebox | curl --tls-max 1.2 -v |
| protocol_version / TLS10 not accepted | Java JSSE | Server capped at TLS 1.0 | s_client -tls1_2 |
| no cipher match / AH02253 | nginx reload, Apache start | Typo in cipher string | nginx -t, configtest |
Per Let’s Encrypt’s and Mozilla’s guidance, the durable fix for any err ssl version or cipher mismatch is to offer TLS 1.2/1.3 with both ECDSA and RSA forward-secret suites and let clients downgrade — not to widen the protocol floor back to TLS 1.0.
How Do You Verify an err ssl version or cipher mismatch Fix?
Verification means proving the listener negotiates exactly the protocol versions and cipher suites you intended — from the client side and from the network side — not that a config reload returned 0. The OpenSSL s_client manual page documents the version-forcing flags used below, so each probe tests one variable at a time.
# 1) Positive test: does the listener negotiate TLS 1.2 and TLS 1.3?
openssl s_client -connect example.com:443 -servername example.com -tls1_2 </dev/null 2>/dev/null | grep -E 'Protocol|Cipher'
# expected: Protocol : TLSv1.2
# Cipher : ECDHE-RSA-AES256-GCM-SHA384
openssl s_client -connect example.com:443 -servername example.com -tls1_3 </dev/null 2>/dev/null | grep -E 'Protocol|Cipher'
# expected: Protocol : TLSv1.3
# Cipher : TLS_AES_256_GCM_SHA384 (RFC 8446 name format, no key-exchange prefix)
# 2) Negative test: a disabled version must fail with an alert, not complete
openssl s_client -connect example.com:443 -servername example.com -tls1_1 </dev/null
# expected: error ... ssl3_read_bytes:sslv3 alert protocol version
# NOT: Verify return code: 0 (ok)
# 3) Cipher-specific overlap, TLS 1.2 only (repeat with ECDHE-ECDSA-AES128-GCM-SHA256 for an ECDSA cert)
openssl s_client -connect example.com:443 -servername example.com -tls1_2
-cipher 'ECDHE-RSA-AES128-GCM-SHA256' </dev/null 2>/dev/null | grep 'Cipher is'
# expected: New, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
# Add -brief (OpenSSL 1.1.1+) for one-line "Protocol version / Ciphersuite" output.
The negative test is the one that catches silent fallback: alert protocol version is TLS alert 70 (RFC 5246 §7.2), which proves rejection rather than downgrade. On OpenSSL 3.x the TLS 1.1 probe may be blocked client-side first — add -cipher 'DEFAULT@SECLEVEL=0' if you see a client error instead of a server alert.
| Tool | Command | Pass criteria | Failure signal |
|---|---|---|---|
| openssl s_client | -tls1_2 / -tls1_3 |
Protocol and Cipher lines as above | no shared cipher, alert protocol version |
| testssl.sh 3.2 | --protocols --ciphers --server-defaults |
“TLS 1.0/1.1 not offered”, no RC4/3DES/EXPORT | legacy suite listed, weak grade |
| nmap | --script ssl-enum-ciphers -p 443 |
only TLSv1.2/1.3 blocks, grade A/A+ | TLSv1.0 block present |
| curl | --tlsv1.2 --tls-max 1.2, --tlsv1.3 |
both complete; ALPN shows h2 |
ALPN, server did not agree |
Run testssl.sh --protocols --ciphers --server-defaults https://example.com for the full offered-version and cipher-order audit, and nmap --script ssl-enum-ciphers -p 443 example.com when a load balancer — not the web server — terminates TLS: nmap hits the VIP, confirming the err ssl version or cipher mismatch fix at the actual listener. For the client path, curl -v --tlsv1.2 --tls-max 1.2 https://example.com (--tls-max needs curl 7.54+) and curl -v --tlsv1.3 --http2 https://example.com should both succeed with SSL connection using TLSv1.3 and ALPN, server accepted to use h2 — HTTP/2 requires TLS 1.2+ (RFC 7540 §9.2), so a protocol edit can silently break ALPN.
Finally, diff against a pre-change transcript: Nginx error.log should stop emitting no shared cipher and SSL_do_handshake() failed ... sslv3 alert handshake failure; Apache error_log should stop logging AH02032/AH02218 negotiation failures. Save the original s_client output so you can compare exact Protocol and Cipher values — that comparison is what proves the err ssl version or cipher mismatch fix is real.
It means the browser or client and the server could not agree on a TLS protocol version or cipher suite during the handshake. The certificate may be valid, but the connection stops before HTTP because no common TLS 1.2 or TLS 1.3 setting was found. Chrome shows ERR_SSL_VERSION_OR_CIPHER_MISMATCH, while OpenSSL often shows sslv3 alert handshake failure or no shared cipher.
No, an expired certificate normally produces ERR_CERT_DATE_INVALID in Chrome or certificate verify failed in OpenSSL. The err ssl version or cipher mismatch error happens earlier, when the client and server negotiate protocol version and cipher suite. A valid Let's Encrypt certificate does not fix a TLS 1.0 client talking to a TLS 1.2-only server.
Set ssl_protocols TLSv1.2 TLSv1.3 and a modern ssl_ciphers list that includes ECDHE-RSA and ECDHE-ECDSA AES-GCM or CHACHA20 suites, then run nginx -t && systemctl reload nginx. Test with openssl s_client -connect example.com:443 -servername example.com -tls1_2 and -tls1_3. If legacy clients still fail, isolate them on a separate listener instead of lowering the main site below TLS 1.2.
TLS 1.3 helps modern clients because it uses five AEAD cipher suites and removes static RSA key exchange, but it does not help a client that only supports TLS 1.0 or TLS 1.1. Keep TLS 1.2 enabled for older Java 8, Android, and embedded clients, and use TLS 1.3 where both sides support it. The fix is overlapping protocol and cipher support, not TLS 1.3 alone.
Different clients ship different TLS stacks and default cipher lists. An old Android app may only offer TLS 1.0 and 3DES, while Chrome 120+ offers TLS 1.2 and TLS 1.3 with AES-GCM and CHACHA20. A CDN or corporate proxy can also terminate TLS with a different minimum version, so test the exact client path with openssl s_client and curl.
A Let's Encrypt certificate itself does not cause err ssl version or cipher mismatch because certificates provide identity and trust, not protocol or cipher negotiation. However, a missing intermediate chain can cause a different certificate verification error. Per Let's Encrypt docs, use the full chain file and verify with openssl s_client -showcerts before blaming the certificate for a TLS handshake failure.
Run openssl s_client -connect example.com:443 -servername example.com -tls1_2 and repeat with -tls1_3. Confirm the output contains Protocol : TLSv1.2 or TLSv1.3 and a valid Cipher line. Then force one suite with -cipher 'ECDHE-RSA-AES128-GCM-SHA256' to prove the specific overlap that was missing.
本文由 sslgood.com 安全团队基于生产环境实战经验撰写,关键结论均经过技术复核。