“curl: (35) SSL connect error” on Mac

curl exit code 35 reports a failed step. The curl documentation says: “A problem occurred somewhere in the SSL/TLS handshake.”

Fix this with your agentCopies a prompt for Claude Code, Codex or any agent that can use Terminal.

My Mac has this problem: “curl: (35) SSL connect error” on Mac. Read https://kilobat.app/guides/curl-35-ssl-connect-error.md and work through it with me. Install the Kilobat CLI if it’s missing: brew install seifip/kilobat/kilobat. Run the guide’s Terminal and kilobat checks yourself and tell me what you find. List the steps only I can do. Ask before you change any setting.

Applies to: The curl that comes with macOS and the Homebrew curl, on all current macOS versions.Checked: 29 October 2026

Symptoms

  • Terminal shows curl: (35) SSL connect error or a longer message such as LibreSSL SSL_connect.
  • The connection opens, but the secure handshake fails.
  • Scripts stop with exit code 35.

Likely causes

  • A proxy or filter. A proxy or security app that inspects TLS can break the handshake.
  • A wrong port or scheme. The URL uses https on a port that serves plain HTTP.
  • A wrong clock. A clock that is far off breaks certificate checks.
  • A server TLS fault. The server can use a TLS setup that curl does not accept.

How to check

  1. Run curl with details. The error buffer text pinpoints the problem.

    curl -v https://example.com
  2. Check the date.

    date
  3. Test the handshake with OpenSSL.

    openssl s_client -connect example.com:443 -servername example.com
  4. Try http:// to test the port.

How to fix it

  1. Use the right scheme and port.

  2. Set the clock to automatic under System Settings › General › Date & Time.

  3. Turn off TLS scanning in security software for a short test. Turn it on again after.

  4. Try another network.

With Kilobat

  1. Kilobat's connection doctor tests the address layer by layer: network, proxy, DNS, rules, IPv4, IPv6, TLS and the server. It names the layer that failed.

    kilobat why https://example.com
  2. These Kilobat checks are free. AI agents run them through MCP with diagnose_connection and diagnose_network. See Find why one site or API won't connect.

Questions

Why read the error text with curl -v?

The curl documentation says that the error buffer message pinpoints the problem more closely.

Is (35) the same as (60)?

No. Code 35 is a handshake failure. Code 60 is a failed certificate check. See “curl: (60) SSL certificate problem” on Mac.

Sources

Checked on 29 October 2026.