I have created some 'basic' API calls using cURL on a WP website that have been working until last Friday.
Since then I receive this error message. Error n: 60, Error: SSL certificate problem: certificate has expired.
Now I just checked on https://www.ssllabs.com/ssltest/analyze.html?d=ombri-immo.lu (ombri-immo.lu is the domain of the website) and the certificate is still valid.
(To be thorough I have two website that call the same API and give back the same error)
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_URL => 'https://middleware-production.easy2pilot-v8.com/api/***/token',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_SSL_VERIFYPEER, false,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS =>'{
"login": "**",
"password": "**"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json;charset=UTF-8'
),
));
$response = curl_exec($ch);
echo 'GETINFO: ' . curl_getinfo($ch) . '<br/>';
echo curl_errno($ch) . '<br/>';
echo 'CURL ERROR: ' . curl_error($ch) . '<br/>';
curl_close($ch);
echo $response;
This is the code of the call. The credentials work properly since I tested them on Postman and everything is fine.
I have read many posts and most of them suggest touching thing on the server side, which I have no access to and no knowledge about functioning, I take for granted that it is the domain provider (OVH) that id taking care of that.
Also I am not completely in charge of the project and know for a fact that WordPress is not up to date (Hopefully this will happen tomorrow and will fix everything :) ) and also I have noticed that the curl version installed on the server is old ( again I have contacted the reseller and asked him to update that.
Does anybody have any suggestions on things to try or if for example the domain and server provider should be able to take care of this?
Thanks for taking the time of reading the post.