You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update bundled cacert.pem file. Follows Mozilla's recommendations on invalid certificates. Always use certificate bundle, ignore old installed bundles. Enable HTTP Keep-Alive to enhance performance of multiple API calls
if (curl_errno($ch) == CURLE_SSL_CACERT || curl_errno($ch) == CURLE_SSL_PEER_CERTIFICATE || curl_errno($ch) == 77/* CURLE_SSL_CACERT_BADFILE (constant not defined in PHP though) */)
207
-
{
208
-
/*
209
-
* On some servers, the list of installed certificates is outdated or not present at all (the ca-bundle.crt
210
-
* is not installed). So we tell cURL which certificates we trust. Then we retry the requests.
211
-
*/
212
-
$request_headers[] = "X-Mollie-Debug: used shipped root certificates";
if (strpos(curl_error($ch), "error setting certificate verify locations") !== FALSE)
235
+
if (curl_errno($this->ch) == CURLE_SSL_CACERT || curl_errno($this->ch) == CURLE_SSL_PEER_CERTIFICATE || curl_errno($this->ch) == 77/* CURLE_SSL_CACERT_BADFILE (constant not defined in PHP though) */)
236
+
{
237
+
if (strpos(curl_error($this->ch), "error setting certificate verify locations") !== FALSE)
218
238
{
219
239
/*
220
240
* Error setting CA-file. Could be missing, or there is a bug in OpenSSL with too long paths.
@@ -224,28 +244,39 @@ public function performHttpCall ($http_method, $api_method, $http_body = NULL)
224
244
*/
225
245
array_shift($request_headers);
226
246
$request_headers[] = "X-Mollie-Debug: unable to use shipped root certificaties, no peer validation.";
0 commit comments