summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2017-10-12 13:45:54 +1100
committerChris Johns <chrisj@rtems.org>2017-10-12 13:48:52 +1100
commitf79eaf364fecc9e431ed884890bfb31f554e026a (patch)
tree4b187edac85dce922e68af3ae98800a110345c94
parentsb: Add --source-only-download to make download source simple. (diff)
downloadrtems-source-builder-f79eaf364fecc9e431ed884890bfb31f554e026a.tar.bz2
sb: Remove MD5 and SHA1 as they not secure.
Updates #2536.
-rw-r--r--source-builder/sb/download.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index 65b6ecf..0316e59 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -90,6 +90,8 @@ def _hash_check(file_, absfile, macros, remove = True):
hashlib_algorithms = ['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512']
if hash[0] not in hashlib_algorithms:
raise error.general('invalid hash algorithm for %s: %s' % (file_, hash[0]))
+ if hash[0] in ['md5', 'sha1']:
+ raise error.general('hash: %s: insecure: %s' % (file_, hash[0]))
hasher = None
_in = None
try: