Skip to content

Commit ec36e02

Browse files
kesselbbackportbot[bot]
authored andcommitted
Call openssl_pkey_export with $config and log errors.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent 72b59cb commit ec36e02

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/Service/LoginFlowV2Service.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,10 @@ private function getKeyPair(): array {
225225
throw new \RuntimeException('Could not initialize keys');
226226
}
227227

228-
openssl_pkey_export($res, $privateKey);
228+
if (openssl_pkey_export($res, $privateKey, null, $config) === false) {
229+
$this->logOpensslError();
230+
throw new \RuntimeException('OpenSSL reported a problem');
231+
}
229232

230233
// Extract the public key from $res to $pubKey
231234
$publicKey = openssl_pkey_get_details($res);

0 commit comments

Comments
 (0)