some more error messages
This commit is contained in:
parent
83d98e2d8b
commit
e2e370f199
|
@ -56,20 +56,18 @@ class Crypt {
|
||||||
if ($res === false) {
|
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', 'couldn\'t generate users key-pair for ' . \OCP\User::getUser(), \OCP\Util::ERROR);
|
||||||
$result = false;
|
$result = false;
|
||||||
} else {
|
} elseif (openssl_pkey_export($res, $privateKey)) {
|
||||||
|
|
||||||
// Get private key
|
|
||||||
openssl_pkey_export($res, $privateKey);
|
|
||||||
|
|
||||||
// Get public key
|
// Get public key
|
||||||
$publicKey = openssl_pkey_get_details($res);
|
$publicKey = openssl_pkey_get_details($res);
|
||||||
|
|
||||||
$publicKey = $publicKey['key'];
|
$publicKey = $publicKey['key'];
|
||||||
|
|
||||||
$result = array(
|
$result = array(
|
||||||
'publicKey' => $publicKey,
|
'publicKey' => $publicKey,
|
||||||
'privateKey' => $privateKey
|
'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;
|
return $result;
|
||||||
|
|
Loading…
Reference in New Issue