cURL error 35 PHP Origin: Application & API OSI layer 6 · Presentation Last updated 13 Oct 2026

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.

Exact message you may see cURL error 35SSL connect error
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 not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

1013 — Cloudflare Error 1013: HTTP hostname and TLS SNI hostname mismatch (Cloudflare)1013421 — HTTP 421 Misdirected Request (HTTP)421body already used — TypeError: Failed to execute 'json' on 'Response': body stream already read (JavaScript)body already usedCERTIFICATE_VERIFY_FAILED — SSL: CERTIFICATE_VERIFY_FAILED / unable to get local issuer certificate (API)CERTIFICATE_VERIFY_FA…Cloudflare Origin CA not trusted — NET::ERR_CERT_AUTHORITY_INVALID with a Cloudflare Origin Certificate (record not proxied) (Cloudflare)Cloudflare Origin CA …cURL error 28 — cURL error 28: Operation timed out after 30001 milliseconds with 0 bytes received (PHP)cURL error 28cURL error 6 — cURL error 6: Could not resolve host: api.example.com (PHP)cURL error 6EOF occurred in violation of protocol — Python: ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2396) (SSL / TLS)EOF occurred in viola…cURL erro…

Explore the map of this error Full error map →

🧠 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.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.