mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-07-28 00:09:56 -07:00
🤖 Auto commit for release 'develop' on 2026-02-06
This commit is contained in:
@@ -89,6 +89,23 @@ class InstallController extends Controller
|
||||
return view('install.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create specific RSA keys.
|
||||
*/
|
||||
public function keys(): void
|
||||
{
|
||||
$key = RSA::createKey(4096);
|
||||
|
||||
[$publicKey, $privateKey] = [Passport::keyPath('oauth-public.key'), Passport::keyPath('oauth-private.key')];
|
||||
|
||||
if (file_exists($publicKey) || file_exists($privateKey)) {
|
||||
return;
|
||||
}
|
||||
|
||||
file_put_contents($publicKey, (string) $key->getPublicKey());
|
||||
file_put_contents($privateKey, $key->toString('PKCS1'));
|
||||
}
|
||||
|
||||
public function runCommand(Request $request): JsonResponse
|
||||
{
|
||||
$requestIndex = (int) $request->get('index');
|
||||
@@ -149,21 +166,4 @@ class InstallController extends Controller
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create specific RSA keys.
|
||||
*/
|
||||
public function keys(): void
|
||||
{
|
||||
$key = RSA::createKey(4096);
|
||||
|
||||
[$publicKey, $privateKey] = [Passport::keyPath('oauth-public.key'), Passport::keyPath('oauth-private.key')];
|
||||
|
||||
if (file_exists($publicKey) || file_exists($privateKey)) {
|
||||
return;
|
||||
}
|
||||
|
||||
file_put_contents($publicKey, (string) $key->getPublicKey());
|
||||
file_put_contents($privateKey, $key->toString('PKCS1'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user