Skip to content

Implement PS256/384/512 #2885

Implement PS256/384/512

Implement PS256/384/512 #2885

Triggered via pull request November 22, 2024 11:32
Status Failure
Total duration 54s
Artifacts

mutation-tests.yml

on: pull_request
Matrix: Mutation tests
Fit to window
Zoom out
Zoom in

Annotations

1 error and 5 warnings
Mutation tests (locked, 8.2, ubuntu-latest)
Process completed with exit code 2.
Mutation tests (locked, 8.2, ubuntu-latest): src/Signer/RsaPss.php#L25
Escaped Mutant for Mutator "Concat": @@ @@ try { $private = PublicKeyLoader::loadPrivateKey($key->contents(), $key->passphrase()); } catch (NoKeyLoadedException $e) { - throw new InvalidKeyProvided('It was not possible to parse your key, reason: ' . $e->getMessage()); + throw new InvalidKeyProvided($e->getMessage() . 'It was not possible to parse your key, reason: '); } if (!$private instanceof PrivateKey) { throw InvalidKeyProvided::incompatibleKeyType('RSA', $private::class);
Mutation tests (locked, 8.2, ubuntu-latest): src/Signer/RsaPss.php#L25
Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ try { $private = PublicKeyLoader::loadPrivateKey($key->contents(), $key->passphrase()); } catch (NoKeyLoadedException $e) { - throw new InvalidKeyProvided('It was not possible to parse your key, reason: ' . $e->getMessage()); + throw new InvalidKeyProvided('It was not possible to parse your key, reason: '); } if (!$private instanceof PrivateKey) { throw InvalidKeyProvided::incompatibleKeyType('RSA', $private::class);
Mutation tests (locked, 8.2, ubuntu-latest): src/Signer/RsaPss.php#L42
Escaped Mutant for Mutator "LogicalAnd": @@ @@ throw InvalidKeyProvided::tooShort(self::MINIMUM_KEY_LENGTH, $private->getLength()); } $signature = $private->withPadding(RSA::SIGNATURE_PSS)->withHash($this->algorithm())->withMGFHash($this->algorithm())->sign($payload); - assert(is_string($signature) && $signature !== ''); + assert(is_string($signature) || $signature !== ''); return $signature; } final public function verify(string $expected, string $payload, Key $key): bool
Mutation tests (locked, 8.2, ubuntu-latest): src/Signer/RsaPss.php#L52
Escaped Mutant for Mutator "Concat": @@ @@ try { $public = PublicKeyLoader::loadPublicKey($key->contents()); } catch (NoKeyLoadedException $e) { - throw new InvalidKeyProvided('It was not possible to parse your key, reason: ' . $e->getMessage()); + throw new InvalidKeyProvided($e->getMessage() . 'It was not possible to parse your key, reason: '); } if (!$public instanceof PublicKey) { throw InvalidKeyProvided::incompatibleKeyType('RSA', $public::class);
Mutation tests (locked, 8.2, ubuntu-latest): src/Signer/RsaPss.php#L52
Escaped Mutant for Mutator "ConcatOperandRemoval": @@ @@ try { $public = PublicKeyLoader::loadPublicKey($key->contents()); } catch (NoKeyLoadedException $e) { - throw new InvalidKeyProvided('It was not possible to parse your key, reason: ' . $e->getMessage()); + throw new InvalidKeyProvided('It was not possible to parse your key, reason: '); } if (!$public instanceof PublicKey) { throw InvalidKeyProvided::incompatibleKeyType('RSA', $public::class);