diff options
Diffstat (limited to 'apps/encryption/lib/keymanager.php')
-rw-r--r-- | apps/encryption/lib/keymanager.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php index 0accfb7900a..5cce760fa59 100644 --- a/apps/encryption/lib/keymanager.php +++ b/apps/encryption/lib/keymanager.php @@ -174,6 +174,11 @@ class KeyManager { * check if a key pair for the master key exists, if not we create one */ public function validateMasterKey() { + + if ($this->util->isMasterKeyEnabled() === false) { + return; + } + $masterKey = $this->getPublicMasterKey(); if (empty($masterKey)) { $keyPair = $this->crypt->createKeyPair(); @@ -334,7 +339,7 @@ class KeyManager { /** * Decrypt private key and store it * - * @param string $uid userid + * @param string $uid user id * @param string $passPhrase users password * @return boolean */ @@ -342,7 +347,6 @@ class KeyManager { $this->session->setStatus(Session::INIT_EXECUTED); - try { if($this->util->isMasterKeyEnabled()) { $uid = $this->getMasterKeyId(); @@ -554,9 +558,11 @@ class KeyManager { } /** + * creat a backup of the users private and public key and then delete it + * * @param string $uid */ - public function replaceUserKeys($uid) { + public function deleteUserKeys($uid) { $this->backupAllKeys('password_reset'); $this->deletePublicKey($uid); $this->deletePrivateKey($uid); |