From ea9ebb1c95e0cac5f232fc53d1f0bdcc9a108096 Mon Sep 17 00:00:00 2001
From: Andreas Gohr <andi@splitbrain.org>
Date: Tue, 22 Nov 2016 19:39:07 +0100
Subject: [PATCH] removed unneeded files from random_compat

---
 .gitignore                                    |  4 ++
 vendor/paragonie/random_compat/build-phar.sh  |  5 --
 .../dist/random_compat.phar.pubkey            |  5 --
 .../dist/random_compat.phar.pubkey.asc        | 11 ----
 .../random_compat/other/build_phar.php        | 57 -------------------
 5 files changed, 4 insertions(+), 78 deletions(-)
 delete mode 100755 vendor/paragonie/random_compat/build-phar.sh
 delete mode 100644 vendor/paragonie/random_compat/dist/random_compat.phar.pubkey
 delete mode 100644 vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc
 delete mode 100644 vendor/paragonie/random_compat/other/build_phar.php

diff --git a/.gitignore b/.gitignore
index 7c8d79231..2aa1a3cbe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -77,3 +77,7 @@ vendor/*/*/docs/*
 vendor/*/*/contrib/*
 vendor/splitbrain/php-archive/apigen.neon
 vendor/splitbrain/php-archive/generate-api.sh
+vendor/paragonie/random_compat/build-phar.sh
+vendor/paragonie/random_compat/dist/*
+vendor/paragonie/random_compat/other/*
+
diff --git a/vendor/paragonie/random_compat/build-phar.sh b/vendor/paragonie/random_compat/build-phar.sh
deleted file mode 100755
index b4a5ba31c..000000000
--- a/vendor/paragonie/random_compat/build-phar.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/usr/bin/env bash
-
-basedir=$( dirname $( readlink -f ${BASH_SOURCE[0]} ) )
-
-php -dphar.readonly=0 "$basedir/other/build_phar.php" $*
\ No newline at end of file
diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey
deleted file mode 100644
index eb50ebfcd..000000000
--- a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey
+++ /dev/null
@@ -1,5 +0,0 @@
------BEGIN PUBLIC KEY-----
-MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEEd+wCqJDrx5B4OldM0dQE0ZMX+lx1ZWm
-pui0SUqD4G29L3NGsz9UhJ/0HjBdbnkhIK5xviT0X5vtjacF6ajgcCArbTB+ds+p
-+h7Q084NuSuIpNb6YPfoUFgC/CL9kAoc
------END PUBLIC KEY-----
diff --git a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc b/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc
deleted file mode 100644
index 6a1d7f300..000000000
--- a/vendor/paragonie/random_compat/dist/random_compat.phar.pubkey.asc
+++ /dev/null
@@ -1,11 +0,0 @@
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.22 (MingW32)
-
-iQEcBAABAgAGBQJWtW1hAAoJEGuXocKCZATaJf0H+wbZGgskK1dcRTsuVJl9IWip
-QwGw/qIKI280SD6/ckoUMxKDCJiFuPR14zmqnS36k7N5UNPnpdTJTS8T11jttSpg
-1LCmgpbEIpgaTah+cELDqFCav99fS+bEiAL5lWDAHBTE/XPjGVCqeehyPYref4IW
-NDBIEsvnHPHPLsn6X5jq4+Yj5oUixgxaMPiR+bcO4Sh+RzOVB6i2D0upWfRXBFXA
-NNnsg9/zjvoC7ZW73y9uSH+dPJTt/Vgfeiv52/v41XliyzbUyLalf02GNPY+9goV
-JHG1ulEEBJOCiUD9cE1PUIJwHA/HqyhHIvV350YoEFiHl8iSwm7SiZu5kPjaq74=
-=B6+8
------END PGP SIGNATURE-----
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 70ef4b2ed..000000000
--- a/vendor/paragonie/random_compat/other/build_phar.php
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-$dist = dirname(__DIR__).'/dist';
-if (!is_dir($dist)) {
-    mkdir($dist, 0755);
-}
-if (file_exists($dist.'/random_compat.phar')) {
-    unlink($dist.'/random_compat.phar');
-}
-$phar = new Phar(
-    $dist.'/random_compat.phar',
-    FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::KEY_AS_FILENAME,
-    'random_compat.phar'
-);
-rename(
-    dirname(__DIR__).'/lib/random.php', 
-    dirname(__DIR__).'/lib/index.php'
-);
-$phar->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);
-    }
-}
-- 
GitLab