-
-
Notifications
You must be signed in to change notification settings - Fork 898
Closed
Description
Version: 3.0.44
After the upgrade from version 3.0.43, the PublicKeyLoader can no longer load id_ed25519 Keys. I tested this with freshly generated RSA and id_ed25519 keys:
<?php
include __DIR__ . '/vendor/autoload.php';
$rsaKey = file_get_contents(__DIR__ . '/seclibtestkey');
$ed25519Key = file_get_contents(__DIR__ . '/seclibtestkey_ed25519');
\phpseclib3\Crypt\PublicKeyLoader::loadPrivateKey($rsaKey);
echo "Loading RSA Key works\n";
\phpseclib3\Crypt\PublicKeyLoader::loadPrivateKey($ed25519Key);
echo "Loading ed25519 Key works\n";
Output on 3.0.44:
Loading RSA Key works
PHP Fatal error: Uncaught phpseclib3\Exception\NoKeyLoadedException: Unable to read key in /home/xxx/Documents/Git/xxx/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php:64
Stack trace:
#0 /home/xxx/Documents/Git/xxx/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php(76): phpseclib3\Crypt\PublicKeyLoader::load()
#1 /home/xxx/Documents/Git/xxx/test.php(12): phpseclib3\Crypt\PublicKeyLoader::loadPrivateKey()
#2 {main}
thrown in /home/xxx/Documents/Git/xxx/vendor/phpseclib/phpseclib/phpseclib/Crypt/PublicKeyLoader.php on line 64
Same script ran on 3.0.43:
Loading RSA Key works
Loading ed25519 Key works
saeedvaziry
Metadata
Metadata
Assignees
Labels
No labels