diff --git a/actions/admin/settings/131.ssl.php b/actions/admin/settings/131.ssl.php index 80ca34f5..d2e7fba9 100644 --- a/actions/admin/settings/131.ssl.php +++ b/actions/admin/settings/131.ssl.php @@ -180,9 +180,15 @@ return array( 'label' => $lng['serversettings']['letsencryptkeysize'], 'settinggroup' => 'system', 'varname' => 'letsencryptkeysize', - 'type' => 'int', - 'int_min' => 2048, - 'default' => 4096, + 'type' => 'option', + 'default' => '2048', + 'option_mode' => 'one', + 'option_options' => array( + '2048' => '2048', + '3072' => '3072', + '4096' => '4096', + '8192' => '8192' + ), 'save_method' => 'storeSettingField' ), 'system_leecc' => array( diff --git a/install/updates/froxlor/0.10/update_0.10.inc.php b/install/updates/froxlor/0.10/update_0.10.inc.php index 62ef696c..70c2dacc 100644 --- a/install/updates/froxlor/0.10/update_0.10.inc.php +++ b/install/updates/froxlor/0.10/update_0.10.inc.php @@ -202,6 +202,7 @@ if (\Froxlor\Froxlor::isDatabaseVersion('201902120')) { showUpdateStep("Adding new ECC / ECDSA setting for Let's Encrypt"); Settings::AddNew('system.leecc', '0'); Database::query("UPDATE `" . TABLE_PANEL_CRONRUNS . "` SET `cronclass` = '\\Froxlor\\Cron\\Http\\LetsEncrypt\\AcmeSh' WHERE `cronfile` = 'letsencrypt'"); + Settings::Set('system.letsencryptkeysize', '2048', true); lastStepStatus(0); showUpdateStep("Removing current Let's Encrypt certificates due to new implementation of acme.sh"); diff --git a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php index a6eb841e..900bc076 100644 --- a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php +++ b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php @@ -259,6 +259,8 @@ class AcmeSh extends \Froxlor\Cron\FroxlorCron } if (Settings::Get('system.leecc') > 0) { $acmesh_cmd .= " --keylength ec-" . Settings::Get('system.leecc'); + } else { + $acmesh_cmd .= " --keylength " . Settings::Set('system.letsencryptkeysize'); } if (Settings::Get('system.letsencryptreuseold') != '1') { $acmesh_cmd .= " --always-force-new-domain-key";