MrPHP
MrPHP

Reputation: 182

Curl ssl certificates

I have always turned off CURLOPT_SSL_VERIFYPEER in curl but I really want to upgrade wherever my php/centos/curl checks its certs at. I have CENTOS 4.7 i686, PHP 5.2.16.

I got a nice bundle from stripe.com: https://pastebin.com/raw.php?i=NZE2CuVJ

How do I "install" this to where I don't even need to use

curl_setopt($curl, CURLOPT_CAINFO, 'ca-certificates.crt');

Upvotes: 2

Views: 2939

Answers (1)

Destralak
Destralak

Reputation: 418

Save the bundle as "certificates.pem", and put it on your webserver. Then use

curl_setopt($curl, CURLOPT_CAINFO, '/link/to/directory/certificates.pem');

to load the list of certificates. Also, make sure you're connecting to the right domain. www.domain.com might have a valid certificate, but domain.com might not.

More information: https://serverfault.com/questions/325120/curl-ssl-issue-with-rapidssl-certificates

Upvotes: 1

Related Questions