summaryrefslogtreecommitdiff
path: root/user/nextcloud/openssl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'user/nextcloud/openssl.patch')
-rw-r--r--user/nextcloud/openssl.patch32
1 files changed, 0 insertions, 32 deletions
diff --git a/user/nextcloud/openssl.patch b/user/nextcloud/openssl.patch
deleted file mode 100644
index f705da0ec..000000000
--- a/user/nextcloud/openssl.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php 2019-12-19 08:23:31.000000000 +0000
-+++ nextcloud/lib/private/Authentication/Token/PublicKeyTokenProvider.php 2020-02-18 00:55:54.210000000 +0000
-@@ -295,7 +295,15 @@ class PublicKeyTokenProvider implements
-
- // Generate new key
- $res = openssl_pkey_new($config);
-- openssl_pkey_export($res, $privateKey);
-+ if ($res === false) {
-+ $this->logOpensslError();
-+ throw new \RuntimeException('OpenSSL reported a problem');
-+ }
-+
-+ if (openssl_pkey_export($res, $privateKey, null, $config) === false) {
-+ $this->logOpensslError();
-+ throw new \RuntimeException('OpenSSL reported a problem');
-+ }
-
- // Extract the public key from $res to $pubKey
- $publicKey = openssl_pkey_get_details($res);
-@@ -343,5 +351,11 @@ class PublicKeyTokenProvider implements
- }
- }
-
--
-+ private function logOpensslError() {
-+ $errors = [];
-+ while ($error = openssl_error_string()) {
-+ $errors[] = $error;
-+ }
-+ $this->logger->critical('Something is wrong with your openssl setup: ' . implode(', ', $errors));
-+ }
- }