mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-10-05 18:50:09 +02: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
@ -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…
Reference in New Issue
Block a user