Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-13 11:58:24 +0300
committerGitHub <noreply@github.com>2020-07-13 11:58:24 +0300
commit2c87ce60a04eb98533d430ef7abe386ef0d04c2a (patch)
treefb9dc877522a14ac056e2961f96082ab53965ce5
parent7569bc15bdf0959f1ecc4461954c0dfab93053cf (diff)
parentddc06e3a88f2f993bb8541f3e7efab00cb3367c0 (diff)
Merge pull request #21800 from nextcloud/bug/noid/key_export_call
Call openssl_pkey_export with $config and log errors.
-rw-r--r--core/Service/LoginFlowV2Service.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/Service/LoginFlowV2Service.php b/core/Service/LoginFlowV2Service.php
index a58a6531723..2d5a30e257c 100644
--- a/core/Service/LoginFlowV2Service.php
+++ b/core/Service/LoginFlowV2Service.php
@@ -225,7 +225,10 @@ class LoginFlowV2Service {
throw new \RuntimeException('Could not initialize keys');
}
- openssl_pkey_export($res, $privateKey);
+ 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);