summaryrefslogtreecommitdiffstats
path: root/php-composer-ca-bundle-rpm.patch
blob: 7ae8760df67ca5562ffca4fb2806850934c255f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
diff -up src/CaBundle.php.rpm src/CaBundle.php
--- src/CaBundle.php.rpm	2017-11-30 07:12:46.773928987 +0100
+++ src/CaBundle.php	2017-11-30 07:15:28.549820032 +0100
@@ -130,7 +130,7 @@ class CaBundle
      */
     public static function getBundledCaBundlePath()
     {
-        $caBundleFile = __DIR__.'/../res/cacert.pem';
+        $caBundleFile = '/etc/pki/tls/certs/ca-bundle.crt'; // System CA, always
 
         // cURL does not understand 'phar://' paths
         // see https://github.com/composer/ca-bundle/issues/10
diff -up tests/CaBundleTest.php.rpm tests/CaBundleTest.php
--- tests/CaBundleTest.php.rpm	2019-08-01 11:14:21.577672699 +0200
+++ tests/CaBundleTest.php	2019-08-01 11:14:31.322744408 +0200
@@ -104,7 +104,7 @@ class CaBundleTest extends TestCase
     public function testOpenBaseDir()
     {
         $oldValue = ini_get('open_basedir');
-        ini_set('open_basedir', realpath(__DIR__ . '/../'));
+        ini_set('open_basedir', '/usr/share/php:' . realpath(__DIR__ . '/../'));
         $certFilePath = CaBundle::getSystemCaRootBundlePath();
         $validResult = CaBundle::validateCaFile($certFilePath, null);
         $this->assertTrue($validResult);