Browse Source

more error messages which might be useful for the user to debug his server config

tags/v6.0.0alpha2
Bjoern Schiessle 11 years ago
parent
commit
b39d2d1938
2 changed files with 6 additions and 2 deletions
  1. 3
    1
      apps/files_encryption/lib/crypt.php
  2. 3
    1
      apps/files_encryption/lib/helper.php

+ 3
- 1
apps/files_encryption/lib/crypt.php View File

@@ -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);

+ 3
- 1
apps/files_encryption/lib/helper.php View File

@@ -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…
Cancel
Save