Yet another Paypal Curl / SSL v3 Handshake Error - SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

1.7k views Asked by At

I know there are a number of people asking this question, but none of the solutions I've read to date have worked for me.

A site with a Paypal IPN listener fails in the curl postback. Curl Error: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure

My curl options look as follows:

curl_setopt($ch, CURLOPT_URL, 'https://www.sandbox.paypal.com/cgi-bin/webscr');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: www.sandbox.paypal.com'));
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1); 
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'TLSv1');

My curl version is 7.29.0. This is on a lighttpd based server.

I have a feeling this is because curl is not "accepting" my attempts to force tls, but I'm unsure how to rectify.

1

There are 1 answers

0
the.s.brom On BEST ANSWER

Updating my distribution and thus OpenSSL did solve the problem.