mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-04 22:40:29 +03:00
add common functions for dealing with apk signatures
This commit is contained in:
parent
45688bfe42
commit
efb0bf6ee5
2 changed files with 124 additions and 0 deletions
|
|
@ -390,6 +390,17 @@ class CommonTest(unittest.TestCase):
|
|||
self.assertEqual(keytoolcertfingerprint,
|
||||
fdroidserver.common.apk_signer_fingerprint(apkfile))
|
||||
|
||||
def test_apk_signer_fingerprint_short(self):
|
||||
|
||||
# fingerprints fetched with: keytool -printcert -file ____.RSA
|
||||
testapks = (('repo/obb.main.oldversion_1444412523.apk', '818e469'),
|
||||
('repo/obb.main.twoversions_1101613.apk', '32a2362'),
|
||||
('repo/obb.main.twoversions_1101617.apk', '32a2362'))
|
||||
|
||||
for apkfile, keytoolcertfingerprint in testapks:
|
||||
self.assertEqual(keytoolcertfingerprint,
|
||||
fdroidserver.common.apk_signer_fingerprint_short(apkfile))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = optparse.OptionParser()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue