mirror of
https://github.com/nextcloud/server.git
synced 2026-06-12 18:21:40 -04:00
Merge pull request #21804 from nextcloud/backport/21800/stable19
[stable19] Call openssl_pkey_export with $config and log errors.
This commit is contained in:
commit
dfef0436da
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue