Xu Cheng c9e45b9c26 stop supporting md5 checksum
This prevents a downgrade attack.

Closes Homebrew/homebrew#38433.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-04-07 22:48:55 +08:00

27 lines
381 B
Ruby

class Formula
def self.md5(val)
stable.md5(val)
end
end
class SoftwareSpec
def md5(val)
@resource.md5(val)
end
end
class Resource
def md5(val)
@checksum = Checksum.new(:md5, val)
end
end
class Pathname
def md5
odie <<-EOS.undent
MD5 support has been dropped for security reasons.
Please switch this formula to SHA256.
EOS
end
end