more error messages which might be useful for the user to debug his server config
This commit is contained in:
parent
7ce03ba37c
commit
b39d2d1938
|
@ -57,7 +57,9 @@ 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);
|
||||
while ($msg = openssl_error_string()) {
|
||||
\OCP\Util::writeLog('Encryption library', 'openssl_pkey_new() fails: ' . $msg, \OCP\Util::ERROR);
|
||||
}
|
||||
} elseif (openssl_pkey_export($res, $privateKey)) {
|
||||
// Get public key
|
||||
$keyDetails = openssl_pkey_get_details($res);
|
||||
|
|
|
@ -241,7 +241,9 @@ class Helper {
|
|||
if(openssl_pkey_new(array('private_key_bits' => 4096))) {
|
||||
return true;
|
||||
} else {
|
||||
\OCP\Util::writeLog('Encryption library', 'openssl_pkey_new()fails: ' . openssl_error_string(), \OCP\Util::ERROR);
|
||||
while ($msg = openssl_error_string()) {
|
||||
\OCP\Util::writeLog('Encryption library', 'openssl_pkey_new() fails: ' . $msg, \OCP\Util::ERROR);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue