]> source.dussan.org Git - nextcloud-server.git/commitdiff
more error messages which might be useful for the user to debug his server config
authorBjoern Schiessle <schiessle@owncloud.com>
Thu, 1 Aug 2013 13:52:00 +0000 (15:52 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Thu, 8 Aug 2013 06:39:11 +0000 (08:39 +0200)
apps/files_encryption/lib/crypt.php
apps/files_encryption/lib/helper.php

index 6543a0de5f3b94b8a059e0bf01f1b1a32260041d..c3e88e5944e6b11ebe67b56f673b2f06f39f7c4b 100755 (executable)
@@ -57,7 +57,9 @@ class Crypt {
 \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
index cbc5de41c6bfd7e0565f9253a9bbdc1e7fa8fa7d..b09c584c0b8fe4852128a3440e8ff9762dd53072 100755 (executable)
@@ -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;
                }
        }