Skip to content

Instantly share code, notes, and snippets.

@wsuff
Created October 16, 2012 16:59
Show Gist options
  • Save wsuff/159552ef7d45a1553aa5 to your computer and use it in GitHub Desktop.
Save wsuff/159552ef7d45a1553aa5 to your computer and use it in GitHub Desktop.
redmine-api-php ssl
diff --git a/lib/Redmine/Client.php b/lib/Redmine/Client.php
index 6fad9b9..4082d7c 100644
--- a/lib/Redmine/Client.php
+++ b/lib/Redmine/Client.php
@@ -172,10 +172,11 @@ class Client
curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
}
curl_setopt($curl, CURLOPT_URL, $this->url.$path);
- curl_setopt($curl, CURLOPT_PORT , 80);
+ curl_setopt($curl, CURLOPT_PORT , 443);
curl_setopt($curl, CURLOPT_VERBOSE, 0);
curl_setopt($curl, CURLOPT_HEADER, 0);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$tmp = parse_url($path);
if ('xml' === substr($tmp['path'], -3)) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment