Update to latest ca-bundle
parent
ec63c213f8
commit
5130d02208
|
@ -4,20 +4,20 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "809b291b5f9da41a8bdd414a058e3f07",
|
||||
"content-hash": "88357fd4222a8102552a0d3345696e2e",
|
||||
"packages": [
|
||||
{
|
||||
"name": "composer/ca-bundle",
|
||||
"version": "1.0.8",
|
||||
"version": "1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/ca-bundle.git",
|
||||
"reference": "9dd73a03951357922d8aee6cc084500de93e2343"
|
||||
"reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/9dd73a03951357922d8aee6cc084500de93e2343",
|
||||
"reference": "9dd73a03951357922d8aee6cc084500de93e2343",
|
||||
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/943b2c4fcad1ef178d16a713c2468bf7e579c288",
|
||||
"reference": "943b2c4fcad1ef178d16a713c2468bf7e579c288",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -26,12 +26,9 @@
|
|||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5",
|
||||
"phpunit/phpunit": "^4.8.35",
|
||||
"psr/log": "^1.0",
|
||||
"symfony/process": "^2.5 || ^3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/process": "This is necessary to reliably check whether openssl_x509_parse is vulnerable on older php versions, but can be ignored on PHP 5.5.6+"
|
||||
"symfony/process": "^2.5 || ^3.0 || ^4.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
|
@ -63,7 +60,7 @@
|
|||
"ssl",
|
||||
"tls"
|
||||
],
|
||||
"time": "2017-09-11T07:24:36+00:00"
|
||||
"time": "2017-11-29T09:37:33+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/semver",
|
||||
|
|
|
@ -904,17 +904,7 @@ class RemoteFilesystem
|
|||
if (!isset($defaults['ssl']['cafile']) && !isset($defaults['ssl']['capath'])) {
|
||||
$result = CaBundle::getSystemCaRootBundlePath($caBundleLogger);
|
||||
|
||||
if (preg_match('{^phar://}', $result)) {
|
||||
$hash = hash_file('sha256', $result);
|
||||
$targetPath = rtrim(sys_get_temp_dir(), '\\/') . '/composer-cacert-' . $hash . '.pem';
|
||||
|
||||
if (!file_exists($targetPath) || $hash !== hash_file('sha256', $targetPath)) {
|
||||
$this->streamCopy($result, $targetPath);
|
||||
chmod($targetPath, 0666);
|
||||
}
|
||||
|
||||
$defaults['ssl']['cafile'] = $targetPath;
|
||||
} elseif (is_dir($result)) {
|
||||
if (is_dir($result)) {
|
||||
$defaults['ssl']['capath'] = $result;
|
||||
} else {
|
||||
$defaults['ssl']['cafile'] = $result;
|
||||
|
@ -939,24 +929,6 @@ class RemoteFilesystem
|
|||
return $defaults;
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses stream_copy_to_stream instead of copy to work around https://bugs.php.net/bug.php?id=64634
|
||||
*
|
||||
* @param string $source
|
||||
* @param string $target
|
||||
*/
|
||||
private function streamCopy($source, $target)
|
||||
{
|
||||
$source = fopen($source, 'r');
|
||||
$target = fopen($target, 'w+');
|
||||
|
||||
stream_copy_to_stream($source, $target);
|
||||
fclose($source);
|
||||
fclose($target);
|
||||
|
||||
unset($source, $target);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch certificate common name and fingerprint for validation of SAN.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue