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

早过忘川 提交于 2020-01-05 08:52:42

问题


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:


Updating my distribution and thus OpenSSL did solve the problem.



来源:https://stackoverflow.com/questions/35003430/yet-another-paypal-curl-ssl-v3-handshake-error-ssl23-get-server-hellosslv3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!