Unknown checksum algorithms (based on length) are errors

This commit is contained in:
Jason Karns 2016-01-15 16:47:54 -05:00
parent abc69bd630
commit 26af69a9d3
2 changed files with 5 additions and 2 deletions
bin
test/fixtures/definitions

View file

@ -247,7 +247,7 @@ compute_md5() {
}
verify_checksum() {
local checksum_command="compute_sha2"
local checksum_command
# If the specified filename doesn't exist, return success
local filename="$1"
@ -266,6 +266,9 @@ verify_checksum() {
[ -n "$HAS_SHA2_SUPPORT" ] || return 0
checksum_command="compute_sha2"
;;
*) # unknown checksum algorithm, return failure
return 1
;;
esac
# If the computed checksum is empty, return failure

View file

@ -1 +1 @@
install_package "package-1.0.0" "http://example.com/packages/package-1.0.0.tar.gz#invalid" copy
install_package "package-1.0.0" "http://example.com/packages/package-1.0.0.tar.gz#invalid_64_character_checksum_0000000000000000000000000000000000" copy