implement automatic updater

This commit is contained in:
Philip Nagler-Frank
2022-02-18 13:28:46 +01:00
parent bedeb38f89
commit b5b22c7123
14 changed files with 243 additions and 0 deletions

11
updater/certificates.py Normal file
View File

@@ -0,0 +1,11 @@
import subprocess
def get_apk_certificate(file: str):
output = subprocess.check_output(['keytool', '-printcert', '-rfc', '-jarfile', file], text=True)
lines = output.split("\n")
return '\n'.join(lines[
lines.index('-----BEGIN CERTIFICATE-----'):
(lines.index('-----END CERTIFICATE-----')+1)
])