aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2013-06-29 15:36:14 -0500
committerJack Nagel2013-06-29 15:36:44 -0500
commit99262f41b0ceef8154c9f45519e1658007cf8915 (patch)
tree2c4b6db831c51a72c94566a3ee3e135f130cd1a4 /Library
parent561567ade01aa6044e5ccce465b6a16a1201b109 (diff)
downloadhomebrew-99262f41b0ceef8154c9f45519e1658007cf8915.tar.bz2
Don't attempt to audit md5 checksums, but complain if they are used
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/audit.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb
index 603dac89b..538e41e49 100644
--- a/Library/Homebrew/cmd/audit.rb
+++ b/Library/Homebrew/cmd/audit.rb
@@ -285,10 +285,13 @@ class FormulaAuditor
cksum = s.checksum
next if cksum.nil?
- len = case cksum.hash_type
- when :sha1 then 40
- when :sha256 then 64
- end
+ case cksum.hash_type
+ when :md5
+ problem "md5 checksums are deprecated, please use sha1 or sha256"
+ next
+ when :sha1 then len = 40
+ when :sha256 then len = 64
+ end
if cksum.empty?
problem "#{cksum.hash_type} is empty"