chiark
/
gitweb
/
~ianmdlvl
/
fdroidserver.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f26a908
)
Need the information about what's different from verify_apks
author
Ciaran Gultnieks
<ciaran@ciarang.com>
Sat, 31 Jan 2015 15:58:08 +0000
(15:58 +0000)
committer
Ciaran Gultnieks
<ciaran@ciarang.com>
Sat, 31 Jan 2015 15:58:08 +0000
(15:58 +0000)
fdroidserver/common.py
patch
|
blob
|
history
diff --git
a/fdroidserver/common.py
b/fdroidserver/common.py
index 3b26338501cbbb77692b0c0dd4e66d963047fecf..5b191d28746f5f128cec4679a551a48ec7ae4808 100644
(file)
--- a/
fdroidserver/common.py
+++ b/
fdroidserver/common.py
@@
-1902,6
+1902,11
@@
def verify_apks(signed_apk, unsigned_apk, tmp_dir):
is transferred from the signed to the unsigned apk, and then jarsigner is
used to verify that the signature from the signed apk is also varlid for
the unsigned one.
is transferred from the signed to the unsigned apk, and then jarsigner is
used to verify that the signature from the signed apk is also varlid for
the unsigned one.
+ :param signed_apk: Path to a signed apk file
+ :param unsigned_apk: Path to an unsigned apk file expected to match it
+ :param tmp_dir: Path to directory for temporary files
+ :returns: None if the verification is successful, otherwise a string
+ describing what went wrong.
"""
with ZipFile(signed_apk) as signed_apk_as_zip:
meta_inf_files = ['META-INF/MANIFEST.MF', 'META-INF/CERT.SF', 'META-INF/CERT.RSA']
"""
with ZipFile(signed_apk) as signed_apk_as_zip:
meta_inf_files = ['META-INF/MANIFEST.MF', 'META-INF/CERT.SF', 'META-INF/CERT.RSA']
@@
-1912,10
+1917,9
@@
def verify_apks(signed_apk, unsigned_apk, tmp_dir):
if subprocess.call(['jarsigner', '-verify', unsigned_apk]) != 0:
logging.info("...NOT verified - {0}".format(signed_apk))
if subprocess.call(['jarsigner', '-verify', unsigned_apk]) != 0:
logging.info("...NOT verified - {0}".format(signed_apk))
- compare_apks(signed_apk, unsigned_apk, tmp_dir)
- return False
+ return compare_apks(signed_apk, unsigned_apk, tmp_dir)
logging.info("...successfully verified")
logging.info("...successfully verified")
- return
Tru
e
+ return
Non
e
def compare_apks(apk1, apk2, tmp_dir):
def compare_apks(apk1, apk2, tmp_dir):