mirror of
https://github.com/rbenv/ruby-build.git
synced 2025-05-22 12:51:36 +02:00
Unknown checksum algorithms (based on length) are errors
This commit is contained in:
parent
abc69bd630
commit
26af69a9d3
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue