Skip to content
Latchkey

curl Exit Code 35 in CI: SSL/TLS Handshake Failure

curl exit code 35 means the SSL/TLS handshake failed before any data could be exchanged.

A step exiting 35 from curl connected at the TCP level but could not negotiate a secure session.

What it means

Exit 35 is curl's CURLE_SSL_CONNECT_ERROR. The TLS handshake failed - a protocol version mismatch, an unsupported cipher, or an interrupted negotiation.

Common causes

  • The server requires a TLS version the client disabled (or vice versa).
  • A cipher/curve mismatch.
  • A MITM proxy interfering with the handshake.

How to fix it

Run with -v to see the handshake detail, align TLS versions/ciphers, and update the CA bundle or curl/OpenSSL version. A momentarily flaky handshake can clear on retry.

Reading exit codes in CI

  • A shell reports 128 + N when a process is terminated by signal N: 137 is SIGKILL (usually the out-of-memory killer), 143 is SIGTERM, 130 is SIGINT.
  • Exit code 137 in a container almost always means the kernel killed it for memory. Nothing in the application log will explain it.
  • A pipeline reports the exit status of its LAST command unless pipefail is set, which is how a failing command piped to tee produces a green build.
  • Some tools use non-zero codes for non-failure outcomes. Check the tool documentation before treating any non-zero code as an error.

Frequently asked questions

curl Exit Code 35 in CI: SSL/TLS Handshake Failure?
A step exiting 35 from curl connected at the TCP level but could not negotiate a secure session.
What it means?
Exit 35 is curl's CURLE_SSL_CONNECT_ERROR. The TLS handshake failed - a protocol version mismatch, an unsupported cipher, or an interrupted negotiation.
How to fix it?
Run with -v to see the handshake detail, align TLS versions/ciphers, and update the CA bundle or curl/OpenSSL version. A momentarily flaky handshake can clear on retry.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card