mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 23:10:29 +03:00
make signer_fingerprint() accept DER encoded certs
androguard's v2 signature methods return DER-encoded certificates. The DER- encoded certificates are parsed from JAR Signature's raw "Signature Block File".
This commit is contained in:
parent
4d68163175
commit
ea84014f9b
4 changed files with 24 additions and 21 deletions
|
|
@ -751,7 +751,7 @@ def get_public_key_from_jar(jar):
|
|||
:return: the public key from the jar and its fingerprint
|
||||
"""
|
||||
# extract certificate from jar
|
||||
certs = [n for n in jar.namelist() if common.CERT_PATH_REGEX.match(n)]
|
||||
certs = [n for n in jar.namelist() if common.SIGNATURE_BLOCK_FILE_REGEX.match(n)]
|
||||
if len(certs) < 1:
|
||||
raise VerificationException(_("Found no signing certificates for repository."))
|
||||
if len(certs) > 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue