diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-07-12 20:22:36 +0200 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-07-12 20:22:36 +0200 |
commit | ddc06e3a88f2f993bb8541f3e7efab00cb3367c0 (patch) | |
tree | dde9586561aad845bb77d904a41fbccf419fe901 /core/Service | |
parent | 3f87ef91379cdd4c5937dd7c05a6da3c4861ce0a (diff) | |
download | nextcloud-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.php | 5 |
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); |