Fixed class.lescript_v2.php to work with ACMEv2

Account(kid) needs to be saved for future requests.
Install/Update part is untested.
This commit is contained in:
Markus Petermann
2018-09-18 02:20:17 +02:00
parent 5f29b2cc4a
commit 9e289a2380
4 changed files with 23 additions and 2 deletions

View File

@@ -198,6 +198,7 @@ CREATE TABLE `panel_customers` (
`lepublickey` mediumtext default NULL,
`leprivatekey` mediumtext default NULL,
`leregistered` tinyint(1) NOT NULL default '0',
`leaccount` varchar(255) default '',
`allowed_phpconfigs` varchar(500) NOT NULL default '',
PRIMARY KEY (`customerid`),
UNIQUE KEY `loginname` (`loginname`)
@@ -653,6 +654,7 @@ opcache.interned_strings_buffer'),
('system', 'hsts_incsub', '0'),
('system', 'hsts_preload', '0'),
('system', 'leregistered', '0'),
('system', 'leaccount', ''),
('system', 'nssextrausers', '0'),
('system', 'disable_le_selfcheck', '0'),
('system', 'ssl_protocols', 'TLSv1,TLSv1.2'),
@@ -692,7 +694,7 @@ opcache.interned_strings_buffer'),
('panel', 'password_special_char', '!?<>§$%+#=@'),
('panel', 'customer_hide_options', ''),
('panel', 'version', '0.9.39.5'),
('panel', 'db_version', '201805290');
('panel', 'db_version', '201809180');
DROP TABLE IF EXISTS `panel_tasks`;

View File

@@ -3998,3 +3998,16 @@ if (isDatabaseVersion('201805241')) {
updateToDbVersion('201805290');
}
}
if (isDatabaseVersion('201805290')) {
showUpdateStep("Adding leaccount field to panel customers");
Database::query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD COLUMN `leaccount` varchar(255) default '' AFTER `leregistered`;");
lastStepStatus(0);
showUpdateStep("Adding system setting for let's-encrypt account");
Settings::AddNew('system.leaccount', "");
lastStepStatus(0);
updateToDbVersion('201809180');
}