honor setting for let's encrypt key size if needed
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user