2

I'm having a client with an old shop software that has a Paypal plugin which doesn't seem to work with curl with nss. So I need to change it to openssl.

How can I tell curl to use openssl?

It's a virtual server with:

CentOS 6.7 Plesk 12.5 Quad-Core AMD Opteron(tm) Processor 2352 (4 core(s))

HHGK
  • 21
  • 1
  • 3

2 Answers2

1

I have an old client with server with PHP 5.3.3 using curl with SSL Version NSS/3.12.7.0. We are having trouble sending data to PayWay. They are reporting that the data is sent thru TLS1.0.

I have checked the server using

php -r '$ch = curl_init("https://www.howsmyssl.com/a/check"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $data = curl_exec($ch); curl_close($ch); $json = json_decode($data); echo $json->tls_version;'

And it's returning TLS1.0.

All solutions were to rebuild curl and php. Im on the process of rebuilding the curl. Got some errors and I have to update ca certificates first.

Did yum update ca-certificates

While updating, I see that nss is being updated.

After the ca-certificates update, I checked the tls version again, and it is now using TLS1.2!

0

I'm pretty sure you'll need to rebuild (or, better/easier, reinstall using your package manager) curl, and you'll need to be sure you have OpenSSL built/installed beforehand (which I would wager you do in some fashion). I don't think nss and OpenSSL have the same API, so you can't do some LD path magic to switch between the two.

Sandy Cash
  • 396
  • 1
  • 9
  • But how to do this? I found an other post about this problem at this site: http://stackoverflow.com/questions/16699868/how-can-i-ensure-that-curl-uses-openssl-and-not-nss So is this the right way for my configuration:? `./configure --with-ssl=/usr/include --without-nss` Unfortunately "./configure" doesn't seem to work. I get the following error: "./configure - no such file or directory". I've checked if openssl is installed through: rpm -qa | grep -i openssl The answer was: "openssl-1.0.1e-42.el6.x86_64" So what do I have to do use openssl with curl? – HHGK Nov 16 '15 at 08:14