Software⏱️ 3 min readπŸ“… 2026-06-11

How to Fix: SSL error: Wrong version number

SSL error fix for GitHub API connection on Raspberry Pi with OpenSSL version 1.1.1n.

Quick Answer: Update OpenSSL to the latest version or use a different SSL/TLS library, such as OpenSSL 3.x.

The 'SSL error: Wrong version number' issue occurs when the client and server cannot agree on the SSL/TLS version to use for the connection. This error affects users who are trying to connect to GitHub using tools like curl, especially those using older versions of OpenSSL or TLS.

This error can be frustrating because it prevents users from accessing certain features or resources on GitHub. However, by following these steps, you should be able to resolve the issue and continue using GitHub as usual.

πŸ” Why This Happens

  • The primary cause of this error is that the OpenSSL version used by your Raspberry Pi is not compatible with the TLS version expected by GitHub's API server. This can happen if you're using an older version of OpenSSL or if the TLS configuration on your system is incorrect.
  • Another possible reason for this error is that the ALPN (Application-Layer Protocol Negotiation) mechanism is not working correctly, causing the client to send the wrong SSL/TLS version.

πŸ”§ Proven Troubleshooting Steps

Updating OpenSSL and adjusting TLS configuration

  1. Step 1: Update your Raspberry Pi's OpenSSL version to a more recent one. You can do this by running the following command: `apt-get update && apt-get install -y libssl-dev`. This will ensure you have the latest version of OpenSSL installed.
  2. Step 2: Adjust your TLS configuration to use the correct version. You can do this by adding the following lines to your `/etc/ssl/openssl.cnf` file (create the file if it doesn't exist): `ssl_version = TLSv1.3`. Then, restart your system or reload the OpenSSL daemon for the changes to take effect.

Using a different client or adjusting ALPN

  1. Step 1: Try using a different client that supports TLSv1.3, such as `curl -vLk --tlsv1.3 https://api.github.com/rate_limit`. If this works, then the issue is with your current client and not with the OpenSSL version or TLS configuration.
  2. Step 2: Adjust your ALPN configuration to use the correct version. You can do this by adding the following lines to your `/etc/ssl/openssl.cnf` file (create the file if it doesn't exist): `alpn_protocols = http/1.1,h2`. Then, restart your system or reload the OpenSSL daemon for the changes to take effect.

🎯 Final Words

By updating your OpenSSL version and adjusting your TLS configuration, you should be able to resolve the 'SSL error: Wrong version number' issue on your Raspberry Pi. If this doesn't work, try using a different client or adjusting ALPN. Remember to restart your system or reload the OpenSSL daemon after making any changes to ensure they take effect.

Did this fix your problem?

If not, try searching for specific error codes.

πŸ” Search Error Database

❓ Frequently Asked Questions