From e49f24e3550329913f5eb5e92669f403c9484a91 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 17 Aug 2021 15:50:50 +0200 Subject: [PATCH] Switch phar signatures to sha512 --- src/Composer/Compiler.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/Compiler.php b/src/Composer/Compiler.php index 444f44584..1bec4a513 100644 --- a/src/Composer/Compiler.php +++ b/src/Composer/Compiler.php @@ -71,7 +71,7 @@ class Compiler } $phar = new \Phar($pharFile, 0, 'composer.phar'); - $phar->setSignatureAlgorithm(\Phar::SHA1); + $phar->setSignatureAlgorithm(\Phar::SHA512); $phar->startBuffering(); @@ -173,7 +173,7 @@ class Compiler // re-sign the phar with reproducible timestamp / signature $util = new Timestamps($pharFile); $util->updateTimestamps($this->versionDate); - $util->save($pharFile, \Phar::SHA1); + $util->save($pharFile, \Phar::SHA512); Linter::lint($pharFile); }