Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSL error can not change to TLS

Tags:

php

curl

ssl

paypal

I have been working for quite some time on a website that highly depends on Paypal working properly on it. Without it, it is really useless.

Around 1 in the morning my time (I am at CET timezone) everything working perfectly, I polished up the code, functions and it was working as it should. I made triple checks before I went to sleep that everything works as it should.

I wake up in the morning and nothing that has to do with Paypal actually works. A little bit of an explanation of what I am using before I show you the actual code and error. I am using Express Checkout and Paypal Adaptive Payments SDK.

I have a few "virtual" accounts that I made on developer.paypal.com in order to simulate facilitator (owner) and buyer interaction since I have scenario when owner gives money to ther user and visa versa. Anyhow they both worked perfectly and now they both throw this error (in Adaptive Payments SDK, it tells me in which line of code is a mistake and in Express Checkout since that is code that is done via documentation it does not show in which file the error is but it is the same error):

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

Now after I saw this post https://devblog.paypal.com/poodle-ssl-3-0-vulnerability/ that you just disabled SSL totally, I realized that the problem is in that actually. You want your users to use TLS now which is totally fine. I triple checked that my server has TLS enabled and it does and I changed (for over a million times already) my config settings to use that TLS in cURL (since I am using PHP) by doing something like:

curl_setopt($ch, CURLOPT_SSLVERSION, 1); (this is how it looks like in Express Checkout and in Adaptive Payments it is just an associative array , but it is really the same thing in both)

I also found somewhere and in your advices to actually update my api credentials. I did that. I went to paypal.com -> API and then clicked update which worked, but then I noticed that on my developer.paypal.com account where I have a few of virtual accounts nothing has changed. Should I update those manually or what?

Edit:

This was sent to Paypal support and I was really in a hurry and could not write the entire thing again, so sorry about that! Issue is fixed thanks to anyone who actually took time to read it.

The issue was fixed with the adding CURLOPT_SSL_CIPHER_LIST => 'TLSv1' to my PPHttpConfig.php file! :)

like image 804
Novarac23 Avatar asked Nov 05 '14 14:11

Novarac23


People also ask

How do I fix SSL TLS issue?

The fastest way to fix this SSL/TLS handshake error-causing issue is just to reset your browser to the default settings and disable all your plugins. From there, you can configure the browser however you want, testing your connection with the site in question as you tweak things.

What is SSL TLS error?

A TLS/SSL handshake failure occurs when a client and server cannot establish communication using the TLS/SSL protocol. When this error occurs in Apigee Edge, the client application receives an HTTP status 503 with the message Service Unavailable.


2 Answers

Try add

CURLOPT_SSL_CIPHER_LIST => 'TLSv1'

to your PPHttpConfig.php file. I had the same issue with you and spent hours to find the solution. This worked for me.

like image 69
Fang Cao Avatar answered Sep 22 '22 01:09

Fang Cao


One of the reasons for this error is older version of PHP and OPENSSL for e.g. PHP 5.3.5 will cause this error.

Solution, update the PHP (recomended >= 7).

like image 31
burgur Avatar answered Sep 21 '22 01:09

burgur