Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure curl curl

Error:error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure


TL;TR: your software is too old to support these servers.

Both servers support TLS 1.2 only as can be seen when checking with SSLLabs. Your OpenSSL version is 1.0.0s which does not support TLS 1.2 yet. Support is only available since 1.0.1.

my server have these certificates ...

The setup of your web server (i.e. certificates, TLS versions...) are not relevant because in this case you are the client connecting to some other server.


Your server may support TLS 1.2, but you need to make sure the HTTP requests are actually using it. Based on your result you're getting, you apparently are not using TLS 1.2 with the requests.

Try adding this to your cURL options:

curl_setopt($ch, CURLOPT_SSLVERSION, 6);

That will force TLS 1.2.

Alternatively, get your server software stack updated and this will happen automatically. See this post for more details, most importantly this part:

If you want to use TLS 1.2 you’ll need to upgrade to OpenSSL 1.0.1 as a minimum, and then you’ll be able to set CURLOPT_SSLVERSION to 6 (TLS 1.2).

If you want TLS 1.2 to be used automatically during SSL requests, you’ll also need to upgrade to PHP 5.5.19+ (this is the ideal solution but many projects are still on older PHP versions).


Had the same issue with stamps.com API and in our case at the time of this post the solution was to set the CURLOPT_SSLVERSION to 5.

curl_setopt($ch, CURLOPT_SSLVERSION, 5);