Permalink
Browse files

Merge pull request #44 from DylanLacey/patch-2

Allow users to log SSL details to a file.
  • Loading branch information...
2 parents 4976db9 + 639ba28 commit ce7fea6a8de0090459cf23719aec907452600aa6 @jlipps committed Apr 28, 2015
Showing with 9 additions and 0 deletions.
  1. +9 −0 src/Sauce/Sausage/SauceAPI.php
@@ -53,6 +53,15 @@ protected function makeRequest($url, $type="GET", $params=false)
if (getenv('CURL_CA_BUNDLE')) {
curl_setopt($ch, CURLOPT_CAINFO, getenv('CURL_CA_BUNDLE'));
}
+
+ // If user has requested it, be extremely verbose when making requests.
+ // This is primarily intended to help Sauce Support staff figure out what's
+ // busted.
+ if (getenv('SAUCE_DIAGNOSE_SSL')) {
+ curl_setopt($ch, CURLOPT_CERTINFO, true);
+ curl_setopt($ch, CURLOPT_VERBOSE, true);
+ curl_setopt($ch, CURLOPT_STDERR, getenv('SAUCE_DIAGNOSE_SSL'));
+ }
$headers = array();
$headers[] = 'Content-Type: text/json';

0 comments on commit ce7fea6

Please sign in to comment.