mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
purge dead code: apk_signer_fingerprint_short
This commit is contained in:
parent
ef4bbe4612
commit
9a8d80ee6b
2 changed files with 0 additions and 28 deletions
|
|
@ -3410,22 +3410,6 @@ def apk_signer_fingerprint(apk_path):
|
|||
return signer_fingerprint(cert_encoded)
|
||||
|
||||
|
||||
def apk_signer_fingerprint_short(apk_path):
|
||||
"""Get 7 hex digit SHA-256 fingerprint string for the first signer from given APK.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
apk_path
|
||||
path to APK
|
||||
|
||||
Returns
|
||||
-------
|
||||
first 7 chars of the standard SHA-256 signer fingerprint
|
||||
|
||||
"""
|
||||
return apk_signer_fingerprint(apk_path)[:7]
|
||||
|
||||
|
||||
def metadata_get_sigdir(appid, vercode=None):
|
||||
"""Get signature directory for app."""
|
||||
if vercode:
|
||||
|
|
|
|||
|
|
@ -794,18 +794,6 @@ class CommonTest(SetUpTearDownMixin, unittest.TestCase):
|
|||
self.assertEqual(keytoolcertfingerprint,
|
||||
fdroidserver.common.apk_signer_fingerprint(apkfile))
|
||||
|
||||
@unittest.skipIf(sys.byteorder == 'big', 'androguard is not ported to big-endian')
|
||||
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))
|
||||
|
||||
def test_find_apksigner_system_package_default_path(self):
|
||||
"""apksigner should be automatically used from the PATH"""
|
||||
usr_bin_apksigner = '/usr/bin/apksigner'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue