php-composer-ca-bundle/php-composer-ca-bundle-rpm.patch
Remi Collet b015339725 v1.2.3
(cherry picked from commit 2a16bf5ae2)
2019-08-19 14:41:51 +02:00

24 lines
1.2 KiB
Diff

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);