Jump to content

curl issue " SSL certificate problem: certificate has expired"


Recommended Posts

The issue is like that In URL ssl certificate is working fine but, using curl when I send data to that URL I got error "curl issue " SSL certificate problem: certificate has expired""
before month its working fine but now why its given error, I have fix that issue using "CURLOPT_SSL_VERIFYPEER=FALSE" other solution "CURLOPT_CAINFO" its working fine for me 

my question is :Why is the problem created when there is no certificate that has expired, I want to know proper season for that

This is really an SSL problem not PHP. However, why do you say no certificate has expired? Did you look at the certificate in question? Is it a self signed certificate or a certificate issued by the target web site?

  • 3 weeks later...
On 10/25/2021 at 7:48 PM, gw1500se said:

This is really an SSL problem not PHP. However, why do you say no certificate has expired? Did you look at the certificate in question? Is it a self signed certificate or a certificate issued by the target web site?

In URL SSL is working fine but the issue is only with curl I have also add  CURLOPT_CAINFO and still its given error
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_CAINFO, "/path/to/cacert.pem"); // with server absolute path

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.