Skip to content

Commit

Permalink
Prepared v1.0.2: fixed cacert problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Wong committed Dec 17, 2013
1 parent 31833fe commit e36840f
Show file tree
Hide file tree
Showing 4 changed files with 3,560 additions and 24,791 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mollie/mollie-api-php",
"version": "1.0.1",
"version": "1.0.2",
"description": "Mollie API client library for PHP",
"homepage": "https://github.com/mollie/mollie-api-php",
"license": "BSD-2-Clause",
Expand Down
10 changes: 5 additions & 5 deletions src/Mollie/API/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class Mollie_API_Client
/**
* Version of our client.
*/
const CLIENT_VERSION = "1.0.1";
const CLIENT_VERSION = "1.0.2";

/**
* Endpoint of the remote API.
Expand Down Expand Up @@ -195,6 +195,8 @@ public function performHttpCall ($http_method, $api_method, $http_body = NULL)
}

curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);

$body = curl_exec($ch);

Expand All @@ -206,8 +208,7 @@ public function performHttpCall ($http_method, $api_method, $http_body = NULL)
*/
$request_headers[] = "X-Mollie-Debug: used shipped root certificates";
curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);

curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . DIRECTORY_SEPARATOR . "Api" . DIRECTORY_SEPARATOR . "certdata.txt");
curl_setopt($ch, CURLOPT_CAINFO, realpath(dirname(__FILE__) . "/cacert.pem"));
$body = curl_exec($ch);
}

Expand All @@ -219,8 +220,7 @@ public function performHttpCall ($http_method, $api_method, $http_body = NULL)
*/
$request_headers[] = "X-Mollie-Debug: old OpenSSL found";
curl_setopt($ch, CURLOPT_HTTPHEADER, $request_headers);

curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$body = curl_exec($ch);
}

Expand Down
Loading

0 comments on commit e36840f

Please sign in to comment.