Search code examples
sslcurlcertificateschannel

curl error 35 : failed to receive handshake, SSL/TLS connection failed


When I try to execute this curl command :

curl -v --key some_key_file.key --cert certificate_file.pem --show-error --header "Content-Type: application/json;charset=UTF-8" https://some-api/service

I get the following error : curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed

And the full execution log :

enter image description here

I have searched this error online and haven't found anyone explaining what it really meant.

  • Do you have any idea what the source cause could be ?
  • And do you know if there is a way to get more information about the error ?

Solution

  • Turns out the problem was with my curl version which, for some reason didn't accept the arguments --cert and --key.

    To solve the problem, I installed a completely new curl version and ran it from the instllation folder and it worked.