Skip to content

Commit 5e33c6d

Browse files
kesselbBackportbot
authored andcommitted
Pass $configargs to openssl_pkey_export
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
1 parent 55e7085 commit 5e33c6d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/private/Authentication/Token/PublicKeyTokenProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,10 @@ private function newToken(string $token,
299299
$this->logOpensslError();
300300
}
301301

302-
openssl_pkey_export($res, $privateKey);
302+
if (openssl_pkey_export($res, $privateKey, null, $config) === false) {
303+
$this->logOpensslError();
304+
throw new \RuntimeException('OpenSSL reported a problem');
305+
}
303306

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

0 commit comments

Comments
 (0)