use OC\Encryption\Exceptions\DecryptionFailedException;
use OC\Encryption\Exceptions\EncryptionFailedException;
use OC\Encryption\Exceptions\GenericEncryptionException;
-use OCA\Encryption\KeyManager;
-use OCA\Files_Encryption\Exception\MultiKeyDecryptException;
-use OCA\Files_Encryption\Exception\MultiKeyEncryptException;
use OCP\IConfig;
use OCP\ILogger;
use OCP\IUser;
class Crypt {
- const ENCRYPTION_UKNOWN_ERROR = -1;
- const ENCRYPTION_NOT_INIALIZED_ERROR = 1;
- const ENCRYPTIION_PRIVATE_KEY_NOT_VALID_ERROR = 2;
- const ENCRYPTION_NO_SHARE_KEY_FOUND = 3;
-
const BLOCKSIZE = 8192;
const DEFAULT_CIPHER = 'AES-256-CFB';
'privateKey' => $privateKey
];
}
- $log->error('Encryption library couldn\'t export users private key, please check your servers openSSL configuration.' . $user->getUID(),
+ $log->error('Encryption library couldn\'t export users private key, please check your servers openSSL configuration.' . $this->user->getUID(),
['app' => 'encryption']);
if (openssl_error_string()) {
$log->error('Encryption Library:' . openssl_error_string(),
} else {
$licenses->exec([
'../apps/files',
- '../apps/files_encryption',
+ '../apps/encryption',
'../apps/files_external',
'../apps/files_sharing',
'../apps/files_trashbin',
);
\OCP\Util::connectHook('OCP\Share', 'post_shared', $updater, 'postShared');
\OCP\Util::connectHook('OCP\Share', 'post_unshare', $updater, 'postUnshared');
-
- //\OCP\Util::connectHook('OC_Filesystem', 'post_umount', 'OCA\Files_Encryption\Hooks', 'postUnmount');
- //\OCP\Util::connectHook('OC_Filesystem', 'umount', 'OCA\Files_Encryption\Hooks', 'preUnmount');
}
}
self::$shippedApps = json_decode(file_get_contents($shippedJson), true);
self::$shippedApps = self::$shippedApps['shippedApps'];
} else {
- self::$shippedApps = ['files', 'files_encryption', 'files_external',
+ self::$shippedApps = ['files', 'encryption', 'files_external',
'files_sharing', 'files_trashbin', 'files_versions', 'provisioning_api',
'user_ldap', 'user_webdavauth'];
}
namespace OC\Connector\Sabre;
+use OC\Encryption\Exceptions\GenericEncryptionException;
+
class File extends \OC\Connector\Sabre\Node implements \Sabre\DAV\IFile {
/**
} catch (\OCP\Files\LockNotAcquiredException $e) {
// the file is currently being written to by another process
throw new \OC\Connector\Sabre\Exception\FileLocked($e->getMessage(), $e->getCode(), $e);
- } catch (\OCA\Files_Encryption\Exception\EncryptionException $e) {
+ } catch (GenericEncryptionException $e) {
throw new \Sabre\DAV\Exception\Forbidden($e->getMessage());
} catch (\OCP\Files\StorageNotAvailableException $e) {
throw new \Sabre\DAV\Exception\ServiceUnavailable("Failed to write file contents: ".$e->getMessage());
namespace OC\Encryption\Keys;
+use OC\Encryption\Exceptions\GenericEncryptionException;
use OC\Encryption\Util;
use OC\Files\View;
-use OCA\Files_Encryption\Exception\EncryptionException;
class Storage implements \OCP\Encryption\Keys\IStorage {
*
* @param string $path path to the file, relative to data/
* @return string
- * @throws EncryptionException
+ * @throws GenericEncryptionException
* @internal param string $keyId
*/
private function getFileKeyDir($path) {
if ($this->view->is_dir($path)) {
- throw new EncryptionException('file was expected but directory was given', EncryptionException::GENERIC);
+ throw new GenericEncryptionException('file was expected but directory was given');
}
list($owner, $filename) = $this->util->getUidAndFilename($path);
enableApp('files_sharing');
enableApp('files_trashbin');
-enableApp('files_encryption');
enableApp('encryption');
enableApp('user_ldap');
enableApp('files_versions');