init: force keystore to PKCS12 format

Java 8 supports PKCS12, Java 9+ uses PKCS12 by default, which should have
a .p12 file extension.  `fdroid init` has always just added .jks which is
the old default format.

* https://docs.oracle.com/en/java/javase/12/tools/keytool.html#GUID-5990A2E4-78E3-47B7-AE75-6D1826259549__GUID-A8B9E662-C1C2-4A0E-9307-A8464F0E95D4
* https://openjdk.java.net/jeps/229
This commit is contained in:
Hans-Christoph Steiner 2020-09-09 19:01:53 +02:00
parent ad6985cb40
commit 8c1cf724e1
4 changed files with 14 additions and 23 deletions

View file

@ -134,7 +134,7 @@ default_config = {
'stats_to_carbon': False,
'repo_maxage': 0,
'build_server_always': False,
'keystore': 'keystore.jks',
'keystore': 'keystore.p12',
'smartcardoptions': [],
'char_limits': {
'author': 256,
@ -3425,6 +3425,7 @@ def genkeystore(localconfig):
'-keyalg', 'RSA', '-keysize', '4096',
'-sigalg', 'SHA256withRSA',
'-validity', '10000',
'-storetype', 'pkcs12',
'-storepass:env', 'FDROID_KEY_STORE_PASS',
'-dname', localconfig['keydname'],
'-J-Duser.language=en']