|
|
@ -12,8 +12,6 @@ VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root") |
|
|
|
VERIFIED_SHA512_ROOT=$(cat "${DIR}/trusted-sha512-root-commit") |
|
|
|
VERIFIED_SHA512_ROOT=$(cat "${DIR}/trusted-sha512-root-commit") |
|
|
|
REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits") |
|
|
|
REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits") |
|
|
|
|
|
|
|
|
|
|
|
HAVE_FAILED=false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
HAVE_GNU_SHA512=1 |
|
|
|
HAVE_GNU_SHA512=1 |
|
|
|
[ ! -x "$(which sha512sum)" ] && HAVE_GNU_SHA512=0 |
|
|
|
[ ! -x "$(which sha512sum)" ] && HAVE_GNU_SHA512=0 |
|
|
|
|
|
|
|
|
|
|
@ -95,9 +93,9 @@ while true; do |
|
|
|
FILE_HASHES="" |
|
|
|
FILE_HASHES="" |
|
|
|
for FILE in $(git ls-tree --full-tree -r --name-only "$CURRENT_COMMIT" | LC_ALL=C sort); do |
|
|
|
for FILE in $(git ls-tree --full-tree -r --name-only "$CURRENT_COMMIT" | LC_ALL=C sort); do |
|
|
|
if [ "$HAVE_GNU_SHA512" = 1 ]; then |
|
|
|
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 |
|
|
|
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 |
|
|
|
fi |
|
|
|
[ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"' |
|
|
|
[ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"' |
|
|
|
' |
|
|
|
' |
|
|
|