Errors: How To Resolve SSL Protocol Error

Issue
When attempting to connect to a server or service, if you encounter an ERR_SSL_PROTOCOL_ERROR.

Error Code
ERR_SSL_PROTOCOL_ERROR: Unable to establish a secure connection.

Cause
This error typically occurs when there are issues with the SSL/TLS protocol version compatibility between the client and server, or if the SSL/TLS handshake fails due to incorrect configuration or outdated protocols.

Solution
To resolve the SSL Protocol Error, follow these troubleshooting steps:

  1. Ensure Supported SSL/TLS Protocol Versions
    Ensure that both the client and the server are configured to support compatible SSL/TLS protocol versions (e.g., TLS 1.2 or TLS 1.3). Older versions such as SSL 3.0 or TLS 1.0 are considered insecure and should be disabled.
  2. Update OpenSSL or Relevant Libraries
    If you’re using libraries like OpenSSL, ensure they are up to date to support modern protocols. Run the following command to update OpenSSL on Linux:
sudo apt-get update && sudo apt-get install openssl
  1. Check Server SSL/TLS Configuration
    Verify the server’s SSL/TLS configuration and ensure it is using a valid certificate with proper protocols enabled. Use an SSL checker tool to ensure the server is configured correctly.
  2. Set Correct SSL Protocol in Git or Curl
    If using Git or Curl, explicitly specify the SSL/TLS protocol version. For example, you can instruct Curl to use TLS 1.2 with:
curl --tlsv1.2 https://yourserver.com

For Git, configure SSL settings to ensure compatibility:

git config --global http.sslVersion tlsv1.2
  1. Disable SSL Verification (Temporary Workaround)
    If the SSL protocol error persists and you trust the connection, you can disable SSL verification temporarily (use with caution). For Git, execute:
git config --global http.sslVerify false

Reference

How to Fix ERR_SSL_PROTOCOL_ERROR