From 608f4d3ee9aded5e6b2b9784a1575ffedbd5002f Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 21 Jul 2019 22:21:59 +0200 Subject: [PATCH] Pass $configargs to openssl_pkey_export Signed-off-by: Daniel Kesselberg --- lib/private/Authentication/Token/PublicKeyTokenProvider.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php index adc4b4bed3..318d4468dd 100644 --- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php +++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php @@ -316,7 +316,10 @@ class PublicKeyTokenProvider implements IProvider { throw new \RuntimeException('OpenSSL reported a problem'); } - 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);