Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
ruby-build
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ruby-build
Commits
abc69bd6
Commit
abc69bd6
authored
Jan 15, 2016
by
Jason Karns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SHA2 support shouldn't be a pre-req for MD5 checksum verification
parent
018357fe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
bin/ruby-build
+5
-3
No files found.
bin/ruby-build
View file @
abc69bd6
...
...
@@ -247,8 +247,6 @@ compute_md5() {
}
verify_checksum
()
{
# If there's no SHA2 support, return success
[
-n
"
$HAS_SHA2_SUPPORT
"
]
||
return
0
local
checksum_command
=
"compute_sha2"
# If the specified filename doesn't exist, return success
...
...
@@ -256,7 +254,7 @@ verify_checksum() {
[
-e
"
$filename
"
]
||
return
0
# If there's no expected checksum, return success
local
expected_checksum
=
`
echo
"
$2
"
| tr
[
A-Z]
[
a-z]
`
local
expected_checksum
=
"
$(
echo
"
$2
"
| tr
[
A-Z]
[
a-z]
)
"
[
-n
"
$expected_checksum
"
]
||
return
0
case
"
${#
expected_checksum
}
"
in
...
...
@@ -264,6 +262,10 @@ verify_checksum() {
[
-n
"
$HAS_MD5_SUPPORT
"
]
||
return
0
checksum_command
=
"compute_md5"
;;
64
)
# SHA2 256
[
-n
"
$HAS_SHA2_SUPPORT
"
]
||
return
0
checksum_command
=
"compute_sha2"
;;
esac
# If the computed checksum is empty, return failure
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment