cURL error 35 🐘 PHP

cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to host:443

The TLS handshake failed — protocol/cipher mismatch, a proxy interfering, or the server closed the connection.

Seen on: PHP

Meaning

Error 35 happens before certificate validation (that’s error 60). Old OpenSSL versions without TLS 1.2/1.3, servers requiring SNI, or firewalls resetting TLS connections are typical.

Common causes

  • Outdated OpenSSL/cURL on the server
  • Server requires TLS 1.2+/SNI
  • Firewall or proxy resetting the connection
  • Wrong port (plain HTTP on 443)

⚡ Quick fix

  1. Test with openssl s_client -connect host:443 -servername host
  2. Update OpenSSL/cURL/PHP
  3. Check proxy settings

Detailed fix by platform

Linux

  1. curl -v https://host from the server shows where the handshake stops

How to diagnose

  1. Handshake — Where does openssl s_client stop?
  2. Versions — OpenSSL version on server

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.