Skip to content

Commit

Permalink
Merge pull request #11240 from nextcloud/feature/noid/consider-openss…
Browse files Browse the repository at this point in the history
…l-settings-from-config.php

Consider openssl settings from config.php
  • Loading branch information
MorrisJobke authored Sep 25, 2018
2 parents b8418b5 + 6bdcec6 commit ee73f6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Authentication/Token/PublicKeyTokenProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,10 @@ private function newToken(string $token,
$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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ protected function setUp() {
['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);
Expand Down

0 comments on commit ee73f6c

Please sign in to comment.