mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-17 14:55:07 -05:00
makepkg: do insensitive comparisons of checksums.
This fixes FS#11283 , which was originally reported on the forums : http://bbs.archlinux.org/viewtopic.php?id=53794 Insensitive comparisons were implicitly made before since md5sum --status was used for checking. Now that we use openssl and compare checksums manually in bash, we lost that feature. This can be easily reintroduced using tr '[A-F]' '[a-f]' What convinced me to fix it is that the md5 command line tool generates md5sums in upper case by default : http://www.fourmilab.ch/md5/ And finally, A-F and a-f are the same in hex and both are used. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
282eeadc68
commit
901e4aa5c2
@ -550,7 +550,9 @@ check_checksums() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${integrity_sums[$idx]}" = "$(openssl dgst -${integ} "$file" | awk '{print $NF}')" ]; then
|
local expectedsum="$(echo ${integrity_sums[$idx]} | tr '[A-F]' '[a-f]')"
|
||||||
|
local realsum="$(openssl dgst -${integ} "$file" | awk '{print $NF}')"
|
||||||
|
if [ "$expectedsum" = "$realsum" ]; then
|
||||||
echo "$(gettext "Passed")" >&2
|
echo "$(gettext "Passed")" >&2
|
||||||
else
|
else
|
||||||
echo "$(gettext "FAILED")" >&2
|
echo "$(gettext "FAILED")" >&2
|
||||||
|
Loading…
Reference in New Issue
Block a user