summaryrefslogtreecommitdiffstats
path: root/apps/encryption/lib/crypto
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-03-31 17:13:36 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-07 13:30:29 +0200
commit1358d07d3516ffb6ecedc451bd1a0ad60d3cb673 (patch)
tree9e25e4c5c98a31c4edf0a9a4139cd93a90ac6e2d /apps/encryption/lib/crypto
parente4895bda01f9c94fc33e094ae9466e1cf5502916 (diff)
downloadnextcloud-server-1358d07d3516ffb6ecedc451bd1a0ad60d3cb673.tar.gz
nextcloud-server-1358d07d3516ffb6ecedc451bd1a0ad60d3cb673.zip
let user enable recovery key
Diffstat (limited to 'apps/encryption/lib/crypto')
-rw-r--r--apps/encryption/lib/crypto/encryption.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/encryption/lib/crypto/encryption.php b/apps/encryption/lib/crypto/encryption.php
index 3c93f759407..aa620785824 100644
--- a/apps/encryption/lib/crypto/encryption.php
+++ b/apps/encryption/lib/crypto/encryption.php
@@ -131,6 +131,8 @@ class Encryption implements IEncryptionModule {
$publicKeys[$uid] = $this->keymanager->getPublicKey($uid);
}
+ $publicKeys = $this->keymanager->addSystemKeys($this->accessList, $publicKeys);
+
$encryptedKeyfiles = $this->crypt->multiKeyEncrypt($this->fileKey, $publicKeys);
$this->keymanager->setAllFileKeys($path, $encryptedKeyfiles);
}
@@ -235,7 +237,7 @@ class Encryption implements IEncryptionModule {
$publicKeys[$user] = $this->keymanager->getPublicKey($user);
}
- $publicKeys = $this->addSystemKeys($accessList, $publicKeys);
+ $publicKeys = $this->keymanager->addSystemKeys($accessList, $publicKeys);
$encryptedFileKey = $this->crypt->multiKeyEncrypt($fileKey, $publicKeys);