\r
if ($res === false) {\r
\OCP\Util::writeLog('Encryption library', 'couldn\'t generate users key-pair for ' . \OCP\User::getUser(), \OCP\Util::ERROR);\r
- \OCP\Util::writeLog('Encryption library', openssl_error_string(), \OCP\Util::ERROR);\r
+ while ($msg = openssl_error_string()) {\r
+ \OCP\Util::writeLog('Encryption library', 'openssl_pkey_new() fails: ' . $msg, \OCP\Util::ERROR);\r
+ }\r
} elseif (openssl_pkey_export($res, $privateKey)) {\r
// Get public key\r
$keyDetails = openssl_pkey_get_details($res);\r
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;
}
}