aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2013-06-19 15:58:34 +0200
committerBjörn Schießle <schiessle@owncloud.com>2013-06-19 15:58:34 +0200
commite2e370f1993ebc4eeac64ce293a992be2205260f (patch)
tree7d746fd12226c9b53e9973affdd71267bbca11a8 /apps
parent83d98e2d8b52b8ea975d39ab28bd9b1e14a2a56f (diff)
downloadnextcloud-server-e2e370f1993ebc4eeac64ce293a992be2205260f.tar.gz
nextcloud-server-e2e370f1993ebc4eeac64ce293a992be2205260f.zip
some more error messages
Diffstat (limited to 'apps')
-rwxr-xr-xapps/files_encryption/lib/crypt.php8
1 files changed, 3 insertions, 5 deletions
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;