diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-09-25 18:04:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-25 18:04:20 +0200 |
commit | ee73f6c416990638a08c42fffd42784effc618e1 (patch) | |
tree | 18475b4f970c0c9d715d259a93738b1cb1e3fafa | |
parent | b8418b502da59eec1b16ff66d87e35b4d146a761 (diff) | |
parent | 6bdcec67abe3b0e8587e53f957e68a9b32df4354 (diff) | |
download | nextcloud-server-ee73f6c416990638a08c42fffd42784effc618e1.tar.gz nextcloud-server-ee73f6c416990638a08c42fffd42784effc618e1.zip |
Merge pull request #11240 from nextcloud/feature/noid/consider-openssl-settings-from-config.php
Consider openssl settings from config.php
-rw-r--r-- | lib/private/Authentication/Token/PublicKeyTokenProvider.php | 4 | ||||
-rw-r--r-- | tests/lib/Authentication/Token/PublicKeyTokenProviderTest.php | 1 |
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); |