Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-26 17:51:22 +0400
committerBjörn Schießle <schiessle@owncloud.com>2013-07-02 18:59:13 +0400
commit9a4f2f1318bf38d69ef76a182fd8e148a3bdfcc1 (patch)
treebc1bc9402290037289cebda0d334f1f6d8a3d0d5 /apps
parentc459a5cec285be010fc71093e5e881d5dacb5b9a (diff)
add openssl_error_string() output to the owncloud.log
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_encryption/lib/crypt.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php
index 927064012b6..6543a0de5f3 100755
--- a/apps/files_encryption/lib/crypt.php
+++ b/apps/files_encryption/lib/crypt.php
@@ -57,10 +57,11 @@ class Crypt {
if ($res === false) {
\OCP\Util::writeLog('Encryption library', 'couldn\'t generate users key-pair for ' . \OCP\User::getUser(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('Encryption library', openssl_error_string(), \OCP\Util::ERROR);
} elseif (openssl_pkey_export($res, $privateKey)) {
// Get public key
- $publicKey = openssl_pkey_get_details($res);
- $publicKey = $publicKey['key'];
+ $keyDetails = openssl_pkey_get_details($res);
+ $publicKey = $keyDetails['key'];
$return = array(
'publicKey' => $publicKey,
@@ -68,6 +69,7 @@ class Crypt {
);
} else {
\OCP\Util::writeLog('Encryption library', 'couldn\'t export users private key, please check your servers openSSL configuration.' . \OCP\User::getUser(), \OCP\Util::ERROR);
+ \OCP\Util::writeLog('Encryption library', openssl_error_string(), \OCP\Util::ERROR);
}
return $return;
@@ -206,13 +208,10 @@ class Crypt {
public static function encrypt($plainContent, $iv, $passphrase = '') {
if ($encryptedContent = openssl_encrypt($plainContent, 'AES-128-CFB', $passphrase, false, $iv)) {
-
return $encryptedContent;
-
} else {
-
\OCP\Util::writeLog('Encryption library', 'Encryption (symmetric) of content failed', \OCP\Util::ERROR);
-
+ \OCP\Util::writeLog('Encryption library', openssl_error_string(), \OCP\Util::ERROR);
return false;
}