|
|
|
@ -12,8 +12,6 @@ VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root")
@@ -12,8 +12,6 @@ VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root")
|
|
|
|
|
VERIFIED_SHA512_ROOT=$(cat "${DIR}/trusted-sha512-root-commit") |
|
|
|
|
REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits") |
|
|
|
|
|
|
|
|
|
HAVE_FAILED=false |
|
|
|
|
|
|
|
|
|
HAVE_GNU_SHA512=1 |
|
|
|
|
[ ! -x "$(which sha512sum)" ] && HAVE_GNU_SHA512=0 |
|
|
|
|
|
|
|
|
@ -95,9 +93,9 @@ while true; do
@@ -95,9 +93,9 @@ while true; do
|
|
|
|
|
FILE_HASHES="" |
|
|
|
|
for FILE in $(git ls-tree --full-tree -r --name-only "$CURRENT_COMMIT" | LC_ALL=C sort); do |
|
|
|
|
if [ "$HAVE_GNU_SHA512" = 1 ]; then |
|
|
|
|
HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | sha512sum | { read FIRST OTHER; echo $FIRST; } ) |
|
|
|
|
HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | sha512sum | { read FIRST _; echo $FIRST; } ) |
|
|
|
|
else |
|
|
|
|
HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | shasum -a 512 | { read FIRST OTHER; echo $FIRST; } ) |
|
|
|
|
HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | shasum -a 512 | { read FIRST _; echo $FIRST; } ) |
|
|
|
|
fi |
|
|
|
|
[ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"' |
|
|
|
|
' |
|
|
|
|