From e7d5b34f4f2359686f6f6814a97fafb313c8073c Mon Sep 17 00:00:00 2001 From: rugk Date: Wed, 17 Aug 2016 19:56:35 +0200 Subject: [PATCH] Also exclude PHP phar builder --- .gitignore | 1 + .../random_compat/other/build_phar.php | 57 ------------------- 2 files changed, 1 insertion(+), 57 deletions(-) delete mode 100644 vendor/paragonie/random_compat/other/build_phar.php diff --git a/.gitignore b/.gitignore index 793c353..818140b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,7 @@ vendor/**/LICENSE vendor/**/test vendor/**/tst vendor/**/tests +vendor/**/build_phar.php !vendor/**/*.php composer.lock diff --git a/vendor/paragonie/random_compat/other/build_phar.php b/vendor/paragonie/random_compat/other/build_phar.php deleted file mode 100644 index 70ef4b2..0000000 --- a/vendor/paragonie/random_compat/other/build_phar.php +++ /dev/null @@ -1,57 +0,0 @@ -buildFromDirectory(dirname(__DIR__).'/lib'); -rename( - dirname(__DIR__).'/lib/index.php', - dirname(__DIR__).'/lib/random.php' -); - -/** - * If we pass an (optional) path to a private key as a second argument, we will - * sign the Phar with OpenSSL. - * - * If you leave this out, it will produce an unsigned .phar! - */ -if ($argc > 1) { - if (!@is_readable($argv[1])) { - echo 'Could not read the private key file:', $argv[1], "\n"; - exit(255); - } - $pkeyFile = file_get_contents($argv[1]); - - $private = openssl_get_privatekey($pkeyFile); - if ($private !== false) { - $pkey = ''; - openssl_pkey_export($private, $pkey); - $phar->setSignatureAlgorithm(Phar::OPENSSL, $pkey); - - /** - * Save the corresponding public key to the file - */ - if (!@is_readable($dist.'/random_compat.phar.pubkey')) { - $details = openssl_pkey_get_details($private); - file_put_contents( - $dist.'/random_compat.phar.pubkey', - $details['key'] - ); - } - } else { - echo 'An error occurred reading the private key from OpenSSL.', "\n"; - exit(255); - } -}