androguard is required, remove call to use_androguard()
https://gitlab.com/fdroid/fdroidserver/-/merge_requests/1462
This commit is contained in:
parent
6448b4f6a5
commit
5e76b2dab5
|
@ -3154,20 +3154,18 @@ def get_first_signer_certificate(apkpath):
|
|||
if k not in self:
|
||||
super().__setitem__(k, v)
|
||||
|
||||
certs = None
|
||||
cert_encoded = None
|
||||
if use_androguard():
|
||||
apkobject = _get_androguard_APK(apkpath)
|
||||
apkobject._v2_blocks = FDict()
|
||||
certs = apkobject.get_certificates_der_v3()
|
||||
apkobject = _get_androguard_APK(apkpath)
|
||||
apkobject._v2_blocks = FDict()
|
||||
certs = apkobject.get_certificates_der_v3()
|
||||
if len(certs) > 0:
|
||||
logging.debug(_('Using APK Signature v3'))
|
||||
cert_encoded = certs[0]
|
||||
if not cert_encoded:
|
||||
certs = apkobject.get_certificates_der_v2()
|
||||
if len(certs) > 0:
|
||||
logging.debug(_('Using APK Signature v3'))
|
||||
logging.debug(_('Using APK Signature v2'))
|
||||
cert_encoded = certs[0]
|
||||
if not cert_encoded:
|
||||
certs = apkobject.get_certificates_der_v2()
|
||||
if len(certs) > 0:
|
||||
logging.debug(_('Using APK Signature v2'))
|
||||
cert_encoded = certs[0]
|
||||
|
||||
if not cert_encoded:
|
||||
with zipfile.ZipFile(apkpath, 'r') as apk:
|
||||
|
|
Loading…
Reference in New Issue