Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

  1. Blog
  2. 15 November 2026
  3. 4 min read

Stefan Bogdanescu

Founder & Senior Architect

Resolving SSL23_GET_SERVER_HELLO: SSLv3 alert handshake failure on PayPal API Connections

When deploying a PHP application from a development environment to a production server, SSL/TLS errors often surface unexpectedly. The specific error Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure indicates that the client (your PHP script) and the server (PayPal's API endpoint) could not agree on a secure protocol version to initiate the connection.

The code snippet provided attempts to fetch an OAuth token from api.sandbox.paypal.com. It works perfectly on localhost but fails on the live server. The initial attempt to bypass this by setting CURLOPT_SSL_VERIFYPEER to false is a dangerous practice that exposes your production server to Man-in-the-Middle attacks and should never be used in a real-world scenario.

The subsequent diagnostic script targeting tlstest.paypal.com reveals the root cause: an incompatibility in the SSL/TLS protocols supported by the server's environment versus what PayPal expects. The error message "Unknown SSL protocol error" combined with the handshake failure points directly to outdated or misconfigured OpenSSL libraries on the production machine.

Protocol Version Mismatch

The most critical detail lies in the certificate chain provided for your live server. While the leaf certificate and intermediate certificates appear standard, the final issuer in the chain is VeriSign Class 3 Public Primary Certification Authority - G5. The log explicitly flags this root certificate as having a "WEAK" signature algorithm: SHA1withRSA.

Modern SSL/TLS protocols have deprecated SHA-1 for digital signatures due to collision vulnerabilities. PayPal's servers, running current OpenSSL versions, likely refuse to complete the handshake with a client that presents or relies on a chain containing a SHA-1 signed root certificate, or if the underlying OpenSSL library itself is too old to handle the negotiation correctly for modern cipher suites.

In your diagnostic output, you see:

  • TLS 1.2: Yes
  • TLS 1.1: Yes
  • TLS 1.0: Yes
  • SSL 3: No
  • SSL 2: No

This confirms that the application layer (PHP/cURL) is attempting to use TLS, but the negotiation is failing before a handshake is established. This often happens when the server's OpenSSL version is significantly older than the client's expectation, or when specific cipher suites are disabled on one side but not the other.

Diagnosing the Server Environment

The fact that this works on localhost but fails on the live server suggests a difference in the underlying system libraries. On Linux-based servers (like Debian or Ubuntu), the libssl and libcrypto packages must match the version required by the application target.

To verify the OpenSSL version on your production server, run:

openssl version -a

PayPal's documentation recommends a minimum of OpenSSL 1.0.2j or later, with strong preference for 1.1.1 or higher. If your live server is running an older distribution (e.g., Ubuntu 14.04) with an outdated OpenSSL 1.0.1g, it may lack the necessary algorithms to negotiate a secure session with PayPal's modern endpoints.

Solution: Updating System Libraries

The fix is almost invariably updating the system's OpenSSL packages. On Debian-based systems, this involves running:

sudo apt-get update
sudo apt-get install --only-upgrade libssl-dev openssl ca-certificates

On RHEL/CentOS/Fedora systems:

sudo yum update openssl
# or for newer RPM-based distros
sudo dnf update openssl

After updating, you must restart your web server (Nginx/Apache) and the PHP-FPM service to ensure the new libraries are loaded into memory.

Verifying the Fix

Once updated, re-run your diagnostic script against tlstest.paypal.com. The error should resolve if the handshake can now be negotiated using a supported TLS version (preferably 1.2 or 1.3) with strong cipher suites.

If you are building a Laravel application, ensuring your dependencies are up to date is equally important. While Laravel itself does not dictate SSL versions, the underlying PHP installation and OpenSSL bindings do. If you are hosting on a managed platform like LaravelCompany.com, their infrastructure typically runs updated libraries by default, but you should verify that your php.ini settings (if applicable) or .env configurations aren't forcing legacy protocols.

Summary of Actions

  1. Do not disable peer verification. Always set CURLOPT_SSL_VERIFYPEER to true.
  2. Update OpenSSL. Ensure the production server runs a recent version of OpenSSL that supports TLS 1.2 and 1.3 with SHA-256 signatures.
  3. Check Cipher Suites. If updating doesn't work, investigate whether specific ciphers are disabled in your PHP build or web server config (openssl_ciphers).

By aligning the production environment's cryptographic capabilities with modern standards, you eliminate the handshake failure and secure your OAuth connection to PayPal.

Our network