HTTPS handshake error: Fatal - Handshake Failure

You can encounter this error for multiple reasons, one of them already mentioned above (conflicting TLS/cipher suite versions). But it can also be that you’re connecting HTTPS over a HTTP port. Another one is a broken erlang/BEAM install with openssl.

I would try to make really sure you’re connecting to a HTTPS(TLS) port by curling to the endpoint. If curl acts ‘normal’ you’re more sure the issue is inside your own code/side. curl -vvv https://www.example.com

You could list the supported TLS versions and cipher suites with for example https://www.ssllabs.com/ssltest/ (if it is open to the outside world) or otherwise with nmap or openssl s_client. (nmap = nmap --script ssl-enum-ciphers -p 443 www.example.com) see here for more info how to do this.

If you can share the given endpoint and it’s open for the public I can also take a look if you want.

One final last note; maybe you already know but don’t use verify_none in production settings, it’s saying you don’t care where the server TLS certificate comes from (as in: you don’t mind it’s self signed, most of the time not what you want).

1 Like