Only store accountkeys in production
Signed-off-by: Florian Aders <eleras@froxlor.org>
This commit is contained in:
@@ -57,10 +57,13 @@ class lescript
|
|||||||
|
|
||||||
$this->log('Starting new account registration');
|
$this->log('Starting new account registration');
|
||||||
$keys = $this->generateKey();
|
$keys = $this->generateKey();
|
||||||
$upd_stmt = Database::prepare("
|
// Only store the accountkey in production, in staging always generate a new key
|
||||||
UPDATE `".TABLE_PANEL_CUSTOMERS."` SET `lepublickey` = :public, `leprivatekey` = :private WHERE `customerid` = :customerid;
|
if (Settings::Get('system.letsencryptca') == 'production') {
|
||||||
");
|
$upd_stmt = Database::prepare("
|
||||||
Database::pexecute($upd_stmt, array('public' => $keys['public'], 'private' => $keys['private'], 'customerid' => $certrow['customerid']));
|
UPDATE `".TABLE_PANEL_CUSTOMERS."` SET `lepublickey` = :public, `leprivatekey` = :private WHERE `customerid` = :customerid;
|
||||||
|
");
|
||||||
|
Database::pexecute($upd_stmt, array('public' => $keys['public'], 'private' => $keys['private'], 'customerid' => $certrow['customerid']));
|
||||||
|
}
|
||||||
$this->accountKey = $keys['private'];
|
$this->accountKey = $keys['private'];
|
||||||
$this->postNewReg();
|
$this->postNewReg();
|
||||||
$this->log('New account certificate registered');
|
$this->log('New account certificate registered');
|
||||||
|
|||||||
Reference in New Issue
Block a user