mirror of
https://github.com/danog/phpseclib.git
synced 2024-12-14 01:57:20 +01:00
Fixes for phar archives
This commit is contained in:
parent
273ad17800
commit
4e367c9631
@ -261,7 +261,8 @@ abstract class AsymmetricKey
|
|||||||
{
|
{
|
||||||
if (!isset(self::$plugins[static::ALGORITHM][$format])) {
|
if (!isset(self::$plugins[static::ALGORITHM][$format])) {
|
||||||
self::$plugins[static::ALGORITHM][$format] = [];
|
self::$plugins[static::ALGORITHM][$format] = [];
|
||||||
foreach (glob(__DIR__ . '/../' . static::ALGORITHM . '/' . $format . '/*.php') as $file) {
|
foreach (new \DirectoryIterator(__DIR__ . '/../' . static::ALGORITHM . '/' . $format . '/') as $file) {
|
||||||
|
if ($file->getExtension() !== 'php') continue;
|
||||||
$name = pathinfo($file, PATHINFO_FILENAME);
|
$name = pathinfo($file, PATHINFO_FILENAME);
|
||||||
$type = 'phpseclib\Crypt\\' . static::ALGORITHM . '\\' . $format . '\\' . $name;
|
$type = 'phpseclib\Crypt\\' . static::ALGORITHM . '\\' . $format . '\\' . $name;
|
||||||
self::$plugins[static::ALGORITHM][$format][strtolower($name)] = $type;
|
self::$plugins[static::ALGORITHM][$format][strtolower($name)] = $type;
|
||||||
|
Loading…
Reference in New Issue
Block a user