1
votes

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
Have you tried after upgrading OpenSSL?Khalid Mushtaq
I actually did a full distribution upgrade last night, as well as upgrading php and lighttpd to latest versions. Unfortunately the IPN is now failing completely - just keeps retrying with no HTTP error code. I'm going to start a new question with this problem as I'm sure it's completely unrelated. I'll come back here and finish this one up once I get past that hiccup.the.s.brom

1 Answers

2
votes

Updating my distribution and thus OpenSSL did solve the problem.