Add comments

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
(cherry picked from commit 5e31ed4f52)
This commit is contained in:
Carl Schwan 2022-12-05 15:26:36 +01:00
parent 40f01de456
commit 1c558d2f15
2 changed files with 2 additions and 0 deletions

View file

@ -60,6 +60,7 @@ class RSA extends AuthMechanism {
$auth = new RSACrypt();
$auth->setPassword($this->config->getSystemValue('secret', ''));
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
// Add fallback routine for a time where secret was not enforced to be exists
$auth->setPassword('');
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
throw new \RuntimeException('unable to load private key');

View file

@ -58,6 +58,7 @@ class RSAPrivateKey extends AuthMechanism {
$auth = new RSACrypt();
$auth->setPassword($this->config->getSystemValue('secret', ''));
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
// Add fallback routine for a time where secret was not enforced to be exists
$auth->setPassword('');
if (!$auth->loadKey($storage->getBackendOption('private_key'))) {
throw new \RuntimeException('unable to load private key');