From 377c9a97000cd350829962bbef8ecd1f6a573a9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Daniel=20Mart=C3=AD?= Date: Mon, 26 Aug 2013 10:44:52 +0200 Subject: [PATCH] Remove md5 sums from the index (fixes: #336) --- fdroidserver/update.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 545674c3..c23a6428 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -342,17 +342,14 @@ def scan_apks(apps, apkcache, repodir, knownapks): if common.isApkDebuggable(apkfile): print "WARNING: {0} is debuggable... {1}".format(apkfile, line) - # Calculate the md5 and sha256... - m = hashlib.md5() + # Calculate the sha256... sha = hashlib.sha256() with open(apkfile, 'rb') as f: while True: t = f.read(1024) if len(t) == 0: break - m.update(t) sha.update(t) - thisinfo['md5'] = m.hexdigest() thisinfo['sha256'] = sha.hexdigest() # Get the signature (or md5 of, to be precise)... @@ -542,7 +539,7 @@ def make_index(apps, apks, repodir, archive, categories): addElement('apkname', apk['apkname'], doc, apkel) if 'srcname' in apk: addElement('srcname', apk['srcname'], doc, apkel) - for hash_type in ('sha256', 'md5'): + for hash_type in ('sha256'): if not hash_type in apk: continue hashel = doc.createElement("hash") -- 2.30.2