Skip to content

Commit

Permalink
Remove potential key from exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhuys committed Jul 10, 2023
1 parent 86e4159 commit 5aba3df
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CryptKey.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct($keyPath, $passPhrase = null, $keyPermissionsCheck =
throw new LogicException('Unable to read key from file ' . $keyPath);
}
} else {
throw new LogicException('Unable to read key from file ' . $keyPath);
throw new LogicException('Invalid key supplied');
}

if ($keyPermissionsCheck === true) {
Expand Down
2 changes: 1 addition & 1 deletion tests/Utils/CryptKeyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function testKeyString()
public function testUnsupportedKeyType()
{
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Unable to read key');
$this->expectExceptionMessage('Invalid key supplied');

try {
// Create the keypair
Expand Down

0 comments on commit 5aba3df

Please sign in to comment.