diff options
author | Björn Schießle <schiessle@owncloud.com> | 2013-02-14 16:33:57 +0100 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2013-02-14 16:33:57 +0100 |
commit | 8c35bbcba75590d5f66ecf08a4dd07db3fd23732 (patch) | |
tree | 035d5f7528475d22d952123a2e817cbc50af7090 /apps/files_encryption/lib/session.php | |
parent | 5005195db005fd0d7c8fdf1a73e12c4a4619acb9 (diff) | |
download | nextcloud-server-8c35bbcba75590d5f66ecf08a4dd07db3fd23732.tar.gz nextcloud-server-8c35bbcba75590d5f66ecf08a4dd07db3fd23732.zip |
remove debug output, fix typo in file names
Diffstat (limited to 'apps/files_encryption/lib/session.php')
-rw-r--r-- | apps/files_encryption/lib/session.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php index ebf7edcd715..171a6900f0f 100644 --- a/apps/files_encryption/lib/session.php +++ b/apps/files_encryption/lib/session.php @@ -34,23 +34,23 @@ class Session { * The ownCloud key pair is used to allow public link sharing even if encryption is enabled */ public function __construct() { + $view = new \OC\Files\View('/'); if (!$view->is_dir('owncloud_private_key')) { $view->mkdir('owncloud_private_key'); } if (!$view->file_exists("/public-keys/owncloud.public.key") || !$view->file_exists("/owncloud_private_key/owncloud.private.key") ) { - + $keypair = Crypt::createKeypair(); \OC_FileProxy::$enabled = false; // Save public key - $view->file_put_contents( '/public-keys/owncloud.public.key', $keypair['publicKey'] ); + $view->file_put_contents( '/public-keys/ownCloud.public.key', $keypair['publicKey'] ); // Encrypt private key empthy passphrase $encryptedPrivateKey = Crypt::symmetricEncryptFileContent( $keypair['privateKey'], '' ); // Save private key - error_log("encrypted private key: " . $encryptedPrivateKey ); - $view->file_put_contents( '/owncloud_private_key/owncloud.private.key', $encryptedPrivateKey ); + $view->file_put_contents( '/owncloud_private_key/ownCloud.private.key', $encryptedPrivateKey ); \OC_FileProxy::$enabled = true; } |