From 1a70031983001e10469b2d186dcf30de10aec3db Mon Sep 17 00:00:00 2001 From: Nico Mexis <nico.mexis@kabelmail.de> Date: Thu, 30 May 2024 17:28:32 +0000 Subject: [PATCH] Fix OAuth 2.0 keys being generated with PKCS1 Closes #4223 Merge request studip/studip!3055 --- cli/Commands/OAuth2/Keys.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/Commands/OAuth2/Keys.php b/cli/Commands/OAuth2/Keys.php index 609ac4e6b5a..93282ba3153 100644 --- a/cli/Commands/OAuth2/Keys.php +++ b/cli/Commands/OAuth2/Keys.php @@ -47,8 +47,8 @@ class Keys extends Command $this->storeKeyContentsToFile($encryptionKey, $this->generateEncryptionKey()); $keys = RSA::createKey(4096); - $this->storeKeyContentsToFile($publicKey, $keys->getPublicKey()->toString('PKCS1')); - $this->storeKeyContentsToFile($privateKey, $keys->toString('PKCS1')); + $this->storeKeyContentsToFile($publicKey, (string) $key->getPublicKey()); + $this->storeKeyContentsToFile($privateKey, (string) $key); $io->info('Schlüsseldateien erfolgreich angelegt.'); -- GitLab