From dbe04be4489d3a55fcfe66e7d13352cc8614f6c9 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sat, 29 Jun 2013 15:36:14 -0500 Subject: [PATCH] Don't attempt to audit md5 checksums, but complain if they are used --- Library/Homebrew/cmd/audit.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Library/Homebrew/cmd/audit.rb b/Library/Homebrew/cmd/audit.rb index 603dac89b3..538e41e490 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"