1
0
mirror of https://github.com/danog/tgseclib.git synced 2024-12-05 13:39:22 +01:00

Fixes for phar archives

This commit is contained in:
Daniil Gentili 2018-02-20 09:40:59 +00:00
parent 273ad17800
commit 4e367c9631

View File

@ -261,7 +261,8 @@ abstract class AsymmetricKey
{
if (!isset(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);
$type = 'phpseclib\Crypt\\' . static::ALGORITHM . '\\' . $format . '\\' . $name;
self::$plugins[static::ALGORITHM][$format][strtolower($name)] = $type;