diff options
Diffstat (limited to 'apps/encryption/lib/keymanager.php')
-rw-r--r-- | apps/encryption/lib/keymanager.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/encryption/lib/keymanager.php b/apps/encryption/lib/keymanager.php index 8fa42be27fc..ae34286d21c 100644 --- a/apps/encryption/lib/keymanager.php +++ b/apps/encryption/lib/keymanager.php @@ -386,16 +386,17 @@ class KeyManager { public function getFileKey($path, $uid) { $encryptedFileKey = $this->keyStorage->getFileKey($path, $this->fileKeyId, Encryption::ID); - if ($this->util->isMasterKeyEnabled()) { - $uid = $this->getMasterKeyId(); - } - if (is_null($uid)) { $uid = $this->getPublicShareKeyId(); $shareKey = $this->getShareKey($path, $uid); $privateKey = $this->keyStorage->getSystemUserKey($this->publicShareKeyId . '.privateKey', Encryption::ID); $privateKey = $this->crypt->decryptPrivateKey($privateKey); } else { + + if ($this->util->isMasterKeyEnabled()) { + $uid = $this->getMasterKeyId(); + } + $shareKey = $this->getShareKey($path, $uid); $privateKey = $this->session->getPrivateKey(); } |