mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
fix apksigner smartcardoptions
apksigner documents the options as --ks-provider-class and --ks-provider-arg those seem to be accepted but fail when actually making a signature with weird internal exceptions. The new options actually work. From: https://geoffreymetais.github.io/code/key-signing/#scripting
This commit is contained in:
parent
74af61f255
commit
145ba9db54
1 changed files with 7 additions and 2 deletions
|
@ -3064,9 +3064,14 @@ def sign_apk(unsigned_path, signed_path, keyalias):
|
||||||
apk = _get_androguard_APK(unsigned_path)
|
apk = _get_androguard_APK(unsigned_path)
|
||||||
if int(apk.get_target_sdk_version()) >= 30:
|
if int(apk.get_target_sdk_version()) >= 30:
|
||||||
if config['keystore'] == 'NONE':
|
if config['keystore'] == 'NONE':
|
||||||
|
# NOTE: apksigner doesn't like -providerName/--provider-name at all, don't use
|
||||||
|
# apksigner documents the options as --ks-provider-class and --ks-provider-arg
|
||||||
|
# those seem to be accepted but fail when actually making a signature with
|
||||||
|
# weird internal exceptions. Those options actually work.
|
||||||
|
# From: https://geoffreymetais.github.io/code/key-signing/#scripting
|
||||||
replacements = {'-storetype': '--ks-type',
|
replacements = {'-storetype': '--ks-type',
|
||||||
'-providerClass': '--ks-provider-class',
|
'-providerClass': '--provider-class',
|
||||||
'-providerArg': '--ks-provider-arg'}
|
'-providerArg': '--provider-arg'}
|
||||||
signing_args = [replacements.get(n, n) for n in config['smartcardoptions']]
|
signing_args = [replacements.get(n, n) for n in config['smartcardoptions']]
|
||||||
else:
|
else:
|
||||||
signing_args = ['--key-pass', 'env:FDROID_KEY_PASS']
|
signing_args = ['--key-pass', 'env:FDROID_KEY_PASS']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue