\r
} else {\r
\r
- \OC_Log::write('Encryption library', 'Encryption (symmetric) of content failed', \OC_Log::ERROR);\r
+ \OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of content failed', \OCP\Util::ERROR);\r
\r
return false;\r
\r
\r
} else {\r
\r
- \OC_Log::write('Encryption library', 'Encryption (symmetric) of keyfile content failed', \OC_Log::ERROR);\r
+ \OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of keyfile content failed', \OCP\Util::ERROR);\r
\r
return false;\r
\r
\r
} else {\r
\r
- \OC_Log::write('Encryption library', 'Decryption (asymmetric) of sealed content failed', \OC_Log::ERROR);\r
+ \OCP\Util::writeLog('Encryption library', 'Decryption (asymmetric) of sealed content failed', \OCP\Util::ERROR);\r
\r
return false;\r
\r
if (!$strong) {\r
\r
// If OpenSSL indicates randomness is insecure, log error\r
- \OC_Log::write('Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OC_Log::WARN);\r
+ \OCP\Util::writeLog('Encryption library', 'Insecure symmetric key was generated using openssl_random_pseudo_bytes()', \OCP\Util::WARN);\r
\r
}\r
\r
// Check files_encryption infrastructure is ready for action
if (!$util->ready()) {
- \OC_Log::write('Encryption library', 'User account "' . $util->getUserId()
- . '" is not ready for encryption; configuration started', \OC_Log::DEBUG);
+ \OCP\Util::writeLog('Encryption library', 'User account "' . $util->getUserId()
+ . '" is not ready for encryption; configuration started', \OCP\Util::DEBUG);
if (!$util->setupServerSide($password)) {
return false;
if (!$result) {
- \OC_Log::write('Encryption library',
- 'Could not delete keyfile; does not exist: "' . $keyPath, \OC_Log::ERROR);
+ \OCP\Util::writeLog('Encryption library',
+ 'Could not delete keyfile; does not exist: "' . $keyPath, \OCP\Util::ERROR);
}
foreach ($matches as $ma) {
$result = unlink($ma);
if (!$result) {
- \OC_Log::write('Encryption library',
- 'Keyfile or shareKey could not be deleted for file "' . $filePath . '"', \OC_Log::ERROR);
+ \OCP\Util::writeLog('Encryption library',
+ 'Keyfile or shareKey could not be deleted for file "' . $filePath . '"', \OCP\Util::ERROR);
}
}
}
foreach ($userIds as $userId) {
if (!$view->unlink($shareKeyPath . '.' . $userId . '.shareKey')) {
- \OC_Log::write('Encryption library',
+ \OCP\Util::writeLog('Encryption library',
'Could not delete shareKey; does not exist: "' . $shareKeyPath . '.' . $userId
- . '.shareKey"', \OC_Log::ERROR);
+ . '.shareKey"', \OCP\Util::ERROR);
}
}
/** @var $matches array */
foreach ($matches as $ma) {
if (!unlink($ma)) {
- \OC_Log::write('Encryption library',
- 'Could not delete shareKey; does not exist: "' . $ma . '"', \OC_Log::ERROR);
+ \OCP\Util::writeLog('Encryption library',
+ 'Could not delete shareKey; does not exist: "' . $ma . '"', \OCP\Util::ERROR);
}
}
$subdirs = $directories = glob(preg_quote($dir) . '/*', GLOB_ONLYDIR);
// Delete keyfile & shareKey so it isn't orphaned
if (!Keymanager::deleteFileKey($view, $owner, $ownerPath)) {
- \OC_Log::write('Encryption library',
- 'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OC_Log::ERROR);
+ \OCP\Util::writeLog('Encryption library',
+ 'Keyfile or shareKey could not be deleted for file "' . $ownerPath . '"', \OCP\Util::ERROR);
}
Keymanager::delAllShareKeys($view, $owner, $ownerPath);