Call openssl_pkey_export with $config and log errors.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/21800/head
Daniel Kesselberg 4 years ago
parent 3f87ef9137
commit ddc06e3a88
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614

@ -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…
Cancel
Save