The SSL23_GET_SERVER_HELLO error with TLSv1 Alert Protocol Version means the client and server couldn’t agree on a TLS version to use, and the server explicitly rejected the client’s attempt because it was too old.

This usually happens when a client is trying to connect using an outdated TLS version (like TLSv1.0 or TLSv1.1) that the server has disabled for security reasons. The server, upon receiving the client’s Client Hello message, sees the offered protocol versions, finds them unacceptable, and sends back an Alert: Protocol Version message.

Here are the common causes and how to fix them:

  • Client is using an outdated TLS version (TLSv1.0/TLSv1.1) and the server has disabled them.

    • Diagnosis: On the client side, you can use openssl s_client to test the connection and see what versions are supported.
      openssl s_client -connect your_server.com:443 -tls1
      openssl s_client -connect your_server.com:443 -tls1_1
      
      If these fail with the same error, the client is stuck on an old version.
    • Fix: Update the client’s TLS configuration to enable TLSv1.2 or TLSv1.3. For example, if you’re using curl, you can specify the version:
      curl --tlsv1.2 https://your_server.com
      curl --tlsv1.3 https://your_server.com
      
      For applications, you’ll need to adjust their SSL/TLS library settings (e.g., in Python’s ssl module, Java’s SSLContext, or Node.js’s tls module) to prioritize or exclusively use newer versions.
    • Why it works: Newer TLS versions (TLSv1.2 and TLSv1.3) include significant security enhancements and are the current industry standard. Servers often disable older versions to protect against known vulnerabilities. By forcing the client to use a modern version, you satisfy the server’s security requirements.
  • Server is configured to only accept very old TLS versions (unlikely, but possible).

    • Diagnosis: Check the server’s SSL/TLS configuration file (e.g., Apache’s ssl.conf, Nginx’s nginx.conf). Look for directives like SSLProtocol or Protocols.
    • Fix: Update the server’s SSL protocol configuration to include TLSv1.2 and/or TLSv1.3. For example, in Nginx:
      ssl_protocols TLSv1.2 TLSv1.3;
      
      In Apache:
      SSLProtocol -all +TLSv1.2 +TLSv1.3
      
      Then, reload or restart the webserver.
    • Why it works: This explicitly tells the server which TLS versions it should advertise and accept. By including modern protocols, it can negotiate successfully with clients that also support them.
  • Load balancer or proxy in front of the server is terminating SSL and is configured with old protocols.

    • Diagnosis: If you have a load balancer (e.g., AWS ELB/ALB, HAProxy, F5) or a reverse proxy (e.g., Nginx, Traefik) handling SSL termination, inspect its SSL/TLS configuration. The error might be originating from the load balancer’s outbound connection to the backend server, or the load balancer’s inbound connection to the client.
    • Fix: Configure the load balancer or proxy to support TLSv1.2 or TLSv1.3. For AWS ALB, you’d check the listener rules and security policy. For HAProxy, you’d adjust the ssl-default-bind-options or ssl-default-server-options directives.
      # Example for HAProxy frontend
      bind *:443 ssl crt /etc/ssl/your.pem ssl-default-bind-options ssl-min-ver TLSv1.2
      # Example for HAProxy backend (if it's also acting as a client)
      server backend_server 10.0.0.1:8443 check ssl verify none ssl-default-server-options ssl-min-ver TLSv1.2
      
    • Why it works: The load balancer acts as an intermediary. If its own SSL configuration is outdated, it will fail to establish a secure connection with either the client or the backend server, even if both ends are capable of modern TLS. Updating its configuration ensures it can handle modern protocols.
  • Outdated client library or application.

    • Diagnosis: The application itself might be using a very old version of its underlying SSL/TLS library (e.g., OpenSSL, GnuTLS, LibreSSL) that doesn’t support TLSv1.2 or TLSv1.3.
    • Fix: Update the application or its dependencies to a version that supports modern TLS protocols. This often involves updating the operating system or the application’s package manager.
    • Why it works: The application’s ability to establish a secure connection is limited by the capabilities of its SSL/TLS library. Newer libraries have support for newer protocols.
  • Incorrect ServerName Indication (SNI) configuration or missing SNI on the client.

    • Diagnosis: While less common for this specific error, SNI issues can sometimes manifest as handshake failures. If the server hosts multiple SSL certificates, it needs SNI to present the correct one. If the client doesn’t send SNI, or sends it incorrectly, the server might fall back to a default certificate or configuration that is not compatible with the client’s TLS version negotiation.
    • Fix: Ensure the client is sending SNI. Most modern HTTP clients and libraries do this automatically. If you’re using a custom client or a very old tool, you might need to explicitly enable SNI. On the server side, verify that SNI is correctly configured for all virtual hosts.
    • Why it works: SNI is crucial for virtual hosting with SSL. Without it, the server doesn’t know which certificate to offer, leading to potential mismatches or a generic, less secure connection attempt that might fail TLS negotiation.
  • Firewall or network device interfering with the TLS handshake.

    • Diagnosis: A network device (e.g., a firewall, IDS/IPS) might be inspecting or modifying SSL traffic and, due to its own configuration or limitations, is disrupting the TLS handshake, leading to protocol version negotiation failures.
    • Fix: Temporarily disable any SSL inspection or deep packet inspection features on firewalls or network security devices between the client and server to see if the connection succeeds. If it does, reconfigure the security device to allow the specific TLS versions or traffic.
    • Why it works: Some security appliances, especially older ones, might not correctly handle the negotiation of newer TLS versions or may actively block them if they are not configured to recognize them as legitimate. Bypassing or reconfiguring these devices allows the handshake to complete as intended.

The next error you’ll likely encounter if you fix this is related to certificate validation or cipher suite negotiation, as those are the subsequent steps in the TLS handshake.

Want structured learning?

Take the full Tls-ssl course →