Don't attempt to audit md5 checksums, but complain if they are used
This commit is contained in:
parent
f7b8fb1da0
commit
dbe04be448
@ -285,10 +285,13 @@ class FormulaAuditor
|
|||||||
cksum = s.checksum
|
cksum = s.checksum
|
||||||
next if cksum.nil?
|
next if cksum.nil?
|
||||||
|
|
||||||
len = case cksum.hash_type
|
case cksum.hash_type
|
||||||
when :sha1 then 40
|
when :md5
|
||||||
when :sha256 then 64
|
problem "md5 checksums are deprecated, please use sha1 or sha256"
|
||||||
end
|
next
|
||||||
|
when :sha1 then len = 40
|
||||||
|
when :sha256 then len = 64
|
||||||
|
end
|
||||||
|
|
||||||
if cksum.empty?
|
if cksum.empty?
|
||||||
problem "#{cksum.hash_type} is empty"
|
problem "#{cksum.hash_type} is empty"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user