aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Tuke <samtuke@owncloud.com>2013-02-27 18:50:57 +0000
committerSam Tuke <samtuke@owncloud.com>2013-02-27 18:50:57 +0000
commit0bc7d3bcf833e257fa4b2ae3b74d60bef63218b8 (patch)
treea2b898ccfa8927314dce3e2e9f44ac46b4566712
parent953319a2c3d85bf0d5eb86511c7466188b5ca45f (diff)
downloadnextcloud-server-0bc7d3bcf833e257fa4b2ae3b74d60bef63218b8.tar.gz
nextcloud-server-0bc7d3bcf833e257fa4b2ae3b74d60bef63218b8.zip
Added notes where to reuse old keys instead of generating new ones
-rw-r--r--apps/files_encryption/lib/stream.php1
-rw-r--r--apps/files_encryption/lib/util.php1
2 files changed, 2 insertions, 0 deletions
diff --git a/apps/files_encryption/lib/stream.php b/apps/files_encryption/lib/stream.php
index d4b993b4c06..f4bd6f1b6b0 100644
--- a/apps/files_encryption/lib/stream.php
+++ b/apps/files_encryption/lib/stream.php
@@ -318,6 +318,7 @@ class Stream {
// one), save the newly generated keyfile
if ( ! $this->getKey() ) {
+ // TODO: Reuse the keyfile, it it exists, instead of making a new one
$this->keyfile = Crypt::generateKey();
$this->publicKey = Keymanager::getPublicKey( $this->rootView, $this->userId );
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index cd223bd7029..6a18feea7df 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -692,6 +692,7 @@ class Util {
// Save the recrypted key to it's owner's keyfiles directory
// Save new sharekeys to all necessary user directory
+ // TODO: Reuse the keyfile, it it exists, instead of making a new one
if (
! Keymanager::setFileKey( $this->view, $filePath, $fileOwner, $multiEncKey['data'] )
|| ! Keymanager::setShareKeys( $this->view, $filePath, $multiEncKey['keys'] )