summaryrefslogtreecommitdiffstats
path: root/core/Service
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-07-12 20:22:36 +0200
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-07-12 20:22:36 +0200
commitddc06e3a88f2f993bb8541f3e7efab00cb3367c0 (patch)
treedde9586561aad845bb77d904a41fbccf419fe901 /core/Service
parent3f87ef91379cdd4c5937dd7c05a6da3c4861ce0a (diff)
downloadnextcloud-server-ddc06e3a88f2f993bb8541f3e7efab00cb3367c0.tar.gz
nextcloud-server-ddc06e3a88f2f993bb8541f3e7efab00cb3367c0.zip
Call openssl_pkey_export with $config and log errors.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'core/Service')
-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);