Skip to content

Commit f69a9b0

Browse files
authored
Use composer bundled cacerts rather than self-bundled (#34697)
1 parent 7a58d05 commit f69a9b0

File tree

6 files changed

+35
-3225
lines changed

6 files changed

+35
-3225
lines changed

administrator/components/com_admin/script.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5859,8 +5859,9 @@ public function deleteUnexistingFiles($dryRun = false, $suppressOutput = false)
58595859
'/media/com_fields/js/admin-field-edit-modal.js',
58605860
'/media/com_fields/js/admin-field-edit-modal.min.js',
58615861
'/media/com_fields/js/admin-field-edit-modal.min.js.gz',
5862-
// 4.0 from RC 2 to RC 3
5862+
// 4.0 from RC 3 to RC 4
58635863
'/components/com_contact/layouts/joomla/form/renderfield.php',
5864+
'/libraries/src/Http/Transport/cacert.pem'
58645865
);
58655866

58665867
$folders = array(

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
"ext-simplexml": "*",
8282
"psr/log": "~1.0",
8383
"ext-gd": "*",
84-
"web-auth/webauthn-lib": "2.1.*"
84+
"web-auth/webauthn-lib": "2.1.*",
85+
"composer/ca-bundle": "^1.2"
8586
},
8687
"require-dev": {
8788
"phpunit/phpunit": "^8.5",

composer.lock

Lines changed: 27 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libraries/src/Http/Transport/CurlTransport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
\defined('JPATH_PLATFORM') or die;
1212

13+
use Composer\CaBundle\CaBundle;
1314
use Joomla\CMS\Factory;
1415
use Joomla\CMS\Http\Response;
1516
use Joomla\CMS\Http\TransportInterface;
@@ -69,7 +70,7 @@ public function request($method, UriInterface $uri, $data = null, array $headers
6970
$options[CURLOPT_NOBODY] = ($method === 'HEAD');
7071

7172
// Initialize the certificate store
72-
$options[CURLOPT_CAINFO] = $this->getOption('curl.certpath', __DIR__ . '/cacert.pem');
73+
$options[CURLOPT_CAINFO] = $this->getOption('curl.certpath', CaBundle::getBundledCaBundlePath());
7374

7475
// If data exists let's encode it and make sure our Content-type header is set.
7576
if (isset($data))

libraries/src/Http/Transport/StreamTransport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
\defined('JPATH_PLATFORM') or die;
1212

13+
use Composer\CaBundle\CaBundle;
1314
use Joomla\CMS\Factory;
1415
use Joomla\CMS\Http\Response;
1516
use Joomla\CMS\Http\TransportInterface;
@@ -137,7 +138,7 @@ public function request($method, UriInterface $uri, $data = null, array $headers
137138
'http' => $options,
138139
'ssl' => array(
139140
'verify_peer' => true,
140-
'cafile' => $this->getOption('stream.certpath', __DIR__ . '/cacert.pem'),
141+
'cafile' => $this->getOption('stream.certpath', CaBundle::getBundledCaBundlePath()),
141142
'verify_depth' => 5,
142143
'verify_peer_name' => true,
143144
),

0 commit comments

Comments
 (0)