mirror of
https://github.com/androguard/androguard.git
synced 2024-11-23 05:00:11 +00:00
return the first V2 signature block
This commit is contained in:
parent
2e3eaca88d
commit
8eff308cd0
@ -1735,7 +1735,12 @@ class APK:
|
||||
while f.tell() < end_offset - 24:
|
||||
size, key = unpack('<QI', f.read(12))
|
||||
value = f.read(size - 4)
|
||||
self._v2_blocks[key] = value
|
||||
if key in self._v2_blocks:
|
||||
# TODO: Store the duplicate V2 Signature blocks and offer a way to show them
|
||||
# https://github.com/androguard/androguard/issues/1030
|
||||
logger.warning("Duplicate block ID in APK Signing Block: {}".format(key))
|
||||
else:
|
||||
self._v2_blocks[key] = value
|
||||
|
||||
# Test if a signature is found
|
||||
if self._APK_SIG_KEY_V2_SIGNATURE in self._v2_blocks:
|
||||
|
Loading…
Reference in New Issue
Block a user