summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Authentication/Token/PublicKeyTokenProvider.php4
-rw-r--r--tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php1
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/private/Authentication/Token/PublicKeyTokenProvider.php b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
index fe352d29e05..7e98ee939ce 100644
--- a/lib/private/Authentication/Token/PublicKeyTokenProvider.php
+++ b/lib/private/Authentication/Token/PublicKeyTokenProvider.php
@@ -287,10 +287,10 @@ class PublicKeyTokenProvider implements IProvider {
$dbToken->setUid($uid);
$dbToken->setLoginName($loginName);
- $config = [
+ $config = array_merge([
'digest_alg' => 'sha512',
'private_key_bits' => 2048,
- ];
+ ], $this->config->getSystemValue('openssl', []));
// Generate new key
$res = openssl_pkey_new($config);
diff --git a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
index cd3bcb81ba6..681ad35c644 100644
--- a/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
+++ b/tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php
@@ -67,6 +67,7 @@ class PublicKeyTokenProviderTest extends TestCase {
['session_lifetime', 60 * 60 * 24, 150],
['remember_login_cookie_lifetime', 60 * 60 * 24 * 15, 300],
['secret', '', '1f4h9s'],
+ ['openssl', [], []],
]));
$this->logger = $this->createMock(ILogger::class);
$this->timeFactory = $this->createMock(ITimeFactory::class);