chiark / gitweb /
verify: ensure only a single signature is in compared APK
authorHans-Christoph Steiner <hans@eds.org>
Mon, 19 Dec 2016 15:54:32 +0000 (16:54 +0100)
committerHans-Christoph Steiner <hans@eds.org>
Wed, 22 Mar 2017 09:51:12 +0000 (10:51 +0100)
commit998b6245e93ce35ba0a7ff85f64b720cb5674691
tree108bb99cfec9af333899b1cc011b6e7ababf082c
parent3c9eeff7f3244122f42b0b5b7ff54837cb843c22
verify: ensure only a single signature is in compared APK

The ZIP format allows multiple entries with the exact same filename, and on
top of that, it does not allow deleting or updating entries.  To make the
`fdroid verify` procedure failsafe, it needs to create a new temporary APK
that is made up on the contents of the "unsigned APK" and the signature
from the "signed APK".  Since it would be possible to give a signed APK as
in the unsigned one's position, `fdroid verify` was not able to update the
signature since it was just adding the new signature to the end of the ZIP
file.  When reading a ZIP, the first entry is used.
fdroidserver/common.py
tests/common.TestCase