diff --git a/src/Configuration/Configuration.php b/src/Configuration/Configuration.php index d66a22361..2495110b8 100644 --- a/src/Configuration/Configuration.php +++ b/src/Configuration/Configuration.php @@ -109,7 +109,7 @@ final class Configuration 'finder', ]; private const PHP_SCOPER_CONFIG = 'scoper.inc.php'; - private const DEFAULT_SIGNING_ALGORITHM = SigningAlgorithm::SHA1; + private const DEFAULT_SIGNING_ALGORITHM = SigningAlgorithm::SHA512; private const DEFAULT_ALIAS_PREFIX = 'box-auto-generated-alias-'; private const DEFAULT_IGNORED_ANNOTATIONS = [ diff --git a/tests/Configuration/ConfigurationTest.php b/tests/Configuration/ConfigurationTest.php index 1ddeeb2dc..6a290f795 100644 --- a/tests/Configuration/ConfigurationTest.php +++ b/tests/Configuration/ConfigurationTest.php @@ -2986,7 +2986,7 @@ public function test_it_can_be_created_with_only_default_values(): void self::assertNull($this->config->getPrivateKeyPath()); self::assertSame([], $this->config->getReplacements()); self::assertSame('#!/usr/bin/env php', $this->config->getShebang()); - self::assertSame(SigningAlgorithm::SHA1, $this->config->getSigningAlgorithm()); + self::assertSame(SigningAlgorithm::SHA512, $this->config->getSigningAlgorithm()); $version = self::$version; @@ -3096,7 +3096,7 @@ public function test_it_can_be_exported(): void -promptForPrivateKey: false -processedReplacements: [] -shebang: "#!/usr/bin/env php" - -signingAlgorithm: "SHA1" + -signingAlgorithm: "SHA512" -stubBannerContents: "My banner" -stubBannerPath: null -stubPath: null diff --git a/tests/Console/Command/CompileTest.php b/tests/Console/Command/CompileTest.php index e70348813..33f53ddfe 100644 --- a/tests/Console/Command/CompileTest.php +++ b/tests/Console/Command/CompileTest.php @@ -478,7 +478,7 @@ public function test_it_can_build_a_phar_without_any_configuration(): void $phar = new Phar('index.phar'); - self::assertSame('SHA-1', $phar->getSignature()['hash_type']); + self::assertSame('SHA-512', $phar->getSignature()['hash_type']); // Check PHAR content $actualStub = self::normalizeStub($phar->getStub()); @@ -1227,7 +1227,7 @@ public function test_it_can_build_a_phar_file_in_debug_mode(): void -promptForPrivateKey: false -processedReplacements: [] -shebang: "#!/usr/bin/env php" - -signingAlgorithm: "SHA1" + -signingAlgorithm: "SHA512" -stubBannerContents: "" -stubBannerPath: null -stubPath: null