Skip to content
ecdsa.com
Java (JSSE)Java

Error message

The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

Also printed as

  • javax.net.ssl.SSLHandshakeException: (protocol_version) The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]

The selected version (TLS10, TLS11) and the list in brackets depend on the server and on the JVM's enabled protocols. JDK 21 and later prefix the exception text with "(protocol_version) ". Servers that refuse instead of downgrading produce "Received fatal alert: protocol_version".

Java (JSSE) — the server picked a TLS version the JVM does not allow

What it means

The JVM offered TLS 1.3 and 1.2, but the server ignored that and answered with TLS 1.0 (TLS10) or 1.1 (TLS11), which the JVM does not accept. Java aborts the handshake on its own side. The server is too old for current clients; every up-to-date JDK, browser and curl reacts the same way.

Why it happens

How to fix it

  1. 1.

    Enable TLS 1.2 or later on the server

    This is the fix that helps every client. TLS 1.0 and 1.1 are formally deprecated (RFC 8996).

    text
    # Enable TLS 1.2 (and 1.3) on the server or appliance
    ssl_protocols TLSv1.2 TLSv1.3;                 # nginx
    SSLProtocol -all +TLSv1.2 +TLSv1.3             # Apache httpd
  2. 2.

    Confirm that TLS 1.2 is missing

    If a TLS 1.2 handshake fails while TLS 1.0 succeeds, the server must be upgraded.

    bash
    echo | openssl s_client -connect legacy.example.com:443 -servername legacy.example.com -tls1_2 -brief
  3. 3.

    Last resort: allow TLS 1.0/1.1 in one isolated JVM

    A security properties override built from the JDK's own value re-enables the old versions for that JVM only. TLS 1.0/1.1 rely on SHA-1 and CBC constructions with known weaknesses, so limit this to a trusted network and remove it once the device is replaced.

    bash
    # Last resort for ONE JVM that must reach the legacy server: drop TLSv1/TLSv1.1 from
    # this JDK's own jdk.tls.disabledAlgorithms value and pass it as an override
    v=$(sed -n '/^jdk.tls.disabledAlgorithms=/,/[^\\]$/p' "$JAVA_HOME/conf/security/java.security" | sed 's/\\$//' | tr -d '\n')
    printf '%s\n' "$v" | sed -E 's/ TLSv1(\.1)?,//g' > legacy-tls.security
    java -Djava.security.properties=legacy-tls.security -jar legacy-client.jar

Related errors

Browse the full signature error database