SSL read: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure, errno 0

By | December 18, 2013

After another PHP recompilation I’ve started getting the following error while trying to access SSL websites with cURL:

56
SSL read: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure, errno 0

What does this mean and how to solve this issue?

This means your cURL installation is trying to use the wrong number of SSL protocol. All you need to resolve this is to add the following line to your scripts:

curl_setopt($this->ch, CURLOPT_SSLVERSION, 3);

When your script knows what version of SSL protocol is used, no problems should appear. The original information was found here and saved me lots of time. Hope someone will save some time too.

One thought on “SSL read: error:140940E5:SSL routines:SSL3_READ_BYTES:ssl handshake failure, errno 0

Leave a Reply