[rtems-source-builder commit] sb: Remove MD5 and SHA1 as they not secure.

Chris Johns chrisj at rtems.org
Thu Oct 12 02:52:03 UTC 2017


Module:    rtems-source-builder
Branch:    master
Commit:    f79eaf364fecc9e431ed884890bfb31f554e026a
Changeset: http://git.rtems.org/rtems-source-builder/commit/?id=f79eaf364fecc9e431ed884890bfb31f554e026a

Author:    Chris Johns <chrisj at rtems.org>
Date:      Thu Oct 12 13:45:54 2017 +1100

sb: Remove MD5 and SHA1 as they not secure.

Updates #2536.

---

 source-builder/sb/download.py | 2 ++
 1 file changed, 2 insertions(+)

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:




More information about the vc mailing list