Skip to content

Commit 0143d52

Browse files
committed
Remove potential key from exception message
1 parent 8ab731e commit 0143d52

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CryptKey.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function __construct($keyPath, $passPhrase = null, $keyPermissionsCheck =
6464
throw new LogicException('Unable to read key from file ' . $keyPath);
6565
}
6666
} else {
67-
throw new LogicException('Unable to read key from file ' . $keyPath);
67+
throw new LogicException('Invalid key supplied');
6868
}
6969

7070
if ($keyPermissionsCheck === true) {

tests/Utils/CryptKeyTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function testKeyString()
5555
public function testUnsupportedKeyType()
5656
{
5757
$this->expectException(\LogicException::class);
58-
$this->expectExceptionMessage('Unable to read key');
58+
$this->expectExceptionMessage('Invalid key supplied');
5959

6060
try {
6161
// Create the keypair

0 commit comments

Comments
 (0)