From: Björn Schießle Date: Wed, 19 Jun 2013 13:58:34 +0000 (+0200) Subject: some more error messages X-Git-Tag: v5.0.8~68 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=433cb9f01dc5cb27dca3a4095531bd430487e5ae;p=nextcloud-server.git some more error messages --- diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 4322bbf1af2..3e5a97464d2 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -56,20 +56,18 @@ class Crypt { if ($res === false) { \OCP\Util::writeLog('Encryption library', 'couldn\'t generate users key-pair for ' . \OCP\User::getUser(), \OCP\Util::ERROR); $result = false; - } else { - - // Get private key - openssl_pkey_export($res, $privateKey); + } elseif (openssl_pkey_export($res, $privateKey)) { // Get public key $publicKey = openssl_pkey_get_details($res); - $publicKey = $publicKey['key']; $result = array( 'publicKey' => $publicKey, 'privateKey' => $privateKey ); + } else { + \OCP\Util::writeLog('Encryption library', 'couldn\'t export users private key, please check your servers openSSL configuration.' . \OCP\User::getUser(), \OCP\Util::ERROR); } return $result;