summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2020-07-13 10:58:24 +0200
committerGitHub <noreply@github.com>2020-07-13 10:58:24 +0200
commit2c87ce60a04eb98533d430ef7abe386ef0d04c2a (patch)
treefb9dc877522a14ac056e2961f96082ab53965ce5 /core
parent7569bc15bdf0959f1ecc4461954c0dfab93053cf (diff)
parentddc06e3a88f2f993bb8541f3e7efab00cb3367c0 (diff)
downloadnextcloud-server-2c87ce60a04eb98533d430ef7abe386ef0d04c2a.tar.gz
nextcloud-server-2c87ce60a04eb98533d430ef7abe386ef0d04c2a.zip
Merge pull request #21800 from nextcloud/bug/noid/key_export_call
Call openssl_pkey_export with $config and log errors.
Diffstat (limited to 'core')
-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);