Permalink
Browse files

fixed the checker when used within a phar file

  • Loading branch information...
1 parent 254540f commit 98b3a1e32eea9fb5368a1fcccf5884f34e27fc0d @fabpot fabpot committed Jun 17, 2014
Showing with 6 additions and 1 deletion.
  1. +6 −1 SensioLabs/Security/SecurityChecker.php
@@ -76,7 +76,12 @@ public function check($lock, $format = 'text')
curl_setopt($curl, CURLOPT_FAILONERROR, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
- curl_setopt($curl, CURLOPT_CAINFO, __DIR__ . "/Resources/security.sensiolabs.org.crt");
+
+ $cert = __DIR__.'/Resources/security.sensiolabs.org.crt';
+ if ('phar://' == substr(__FILE__, 0, 7)) {
+ copy($cert, $cert = '/tmp/security.sensiolabs.org.crt');
+ }
+ curl_setopt($curl, CURLOPT_CAINFO, $cert);
$response = curl_exec($curl);

0 comments on commit 98b3a1e

Please sign in to comment.