diff options
Diffstat (limited to 'apps/files_encryption')
-rwxr-xr-x | apps/files_encryption/lib/crypt.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_encryption/lib/crypt.php b/apps/files_encryption/lib/crypt.php index 3e5a97464d2..927064012b6 100755 --- a/apps/files_encryption/lib/crypt.php +++ b/apps/files_encryption/lib/crypt.php @@ -51,18 +51,18 @@ class Crypt { */
public static function createKeypair() {
+ $return = false;
+
$res = openssl_pkey_new(array('private_key_bits' => 4096));
if ($res === false) {
\OCP\Util::writeLog('Encryption library', 'couldn\'t generate users key-pair for ' . \OCP\User::getUser(), \OCP\Util::ERROR);
- $result = false;
} elseif (openssl_pkey_export($res, $privateKey)) {
-
// Get public key
$publicKey = openssl_pkey_get_details($res);
$publicKey = $publicKey['key'];
- $result = array(
+ $return = array(
'publicKey' => $publicKey,
'privateKey' => $privateKey
);
@@ -70,7 +70,7 @@ class Crypt { \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;
+ return $return;
}
/**
|