Skip to content

Commit

Permalink
update php compose installer (#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
vixentael authored Jan 29, 2019
1 parent a5c5a25 commit 34366ee
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/phpthemis/composer-setup.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/bin/bash -e

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "echo 'Installed hash = '; echo hash_file('SHA384', 'composer-setup.php');"

php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8')
php -r "if (hash_file('SHA384', 'composer-setup.php') === '48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5')
{ echo 'Valid signature, continue installation'; }
else
{ echo 'ERROR: Invalid installer signature, probably installer was updated'; unlink('composer-setup.php'); exit(1); }
{ echo 'ERROR: Invalid installer signature, probably installer was updated, fix in /tests/phpthemis/composer-setup.sh'; unlink('composer-setup.php'); exit(1); }
echo PHP_EOL;"

echo "If installation fails, means installer signature is invalid"
Expand Down

0 comments on commit 34366ee

Please sign in to comment.