From 5a23b429ddb1cb924db8e85200b13de54424bf3a Mon Sep 17 00:00:00 2001 From: Daniel Kesselberg Date: Sun, 4 Jun 2023 18:44:47 +0200 Subject: [PATCH] feat: remove check for OpenSSL 1.0.1d and 1.0.2b OpenSSL 1.0.1d: 2013-02-05 OpenSSL 1.0.2b: 2015-06-11 Signed-off-by: Daniel Kesselberg --- .../lib/Controller/CheckSetupController.php | 11 ------ .../Controller/CheckSetupControllerTest.php | 37 ------------------- 2 files changed, 48 deletions(-) diff --git a/apps/settings/lib/Controller/CheckSetupController.php b/apps/settings/lib/Controller/CheckSetupController.php index be0abe0d75c..59175be6884 100644 --- a/apps/settings/lib/Controller/CheckSetupController.php +++ b/apps/settings/lib/Controller/CheckSetupController.php @@ -290,17 +290,6 @@ class CheckSetupController extends Controller { $features = $this->l10n->t('Federated Cloud Sharing'); } - // Check if at least OpenSSL after 1.01d or 1.0.2b - if (strpos($versionString, 'OpenSSL/') === 0) { - $majorVersion = substr($versionString, 8, 5); - $patchRelease = substr($versionString, 13, 6); - - if (($majorVersion === '1.0.1' && ord($patchRelease) < ord('d')) || - ($majorVersion === '1.0.2' && ord($patchRelease) < ord('b'))) { - return $this->l10n->t('cURL is using an outdated %1$s version (%2$s). Please update your operating system or features such as %3$s will not work reliably.', ['OpenSSL', $versionString, $features]); - } - } - // Check if NSS and perform heuristic check if (strpos($versionString, 'NSS/') === 0) { try { diff --git a/apps/settings/tests/Controller/CheckSetupControllerTest.php b/apps/settings/tests/Controller/CheckSetupControllerTest.php index 2b074d24c39..d129850f29e 100644 --- a/apps/settings/tests/Controller/CheckSetupControllerTest.php +++ b/apps/settings/tests/Controller/CheckSetupControllerTest.php @@ -716,43 +716,6 @@ class CheckSetupControllerTest extends TestCase { $this->assertSame('', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); } - public function testIsUsedTlsLibOutdatedWithOlderOpenSsl() { - $this->config->expects($this->any()) - ->method('getSystemValue') - ->willReturn(true); - $this->checkSetupController - ->expects($this->once()) - ->method('getCurlVersion') - ->willReturn(['ssl_version' => 'OpenSSL/1.0.1c']); - $this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.1c). Please update your operating system or features such as installing and updating apps via the App Store or Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); - } - - public function testIsUsedTlsLibOutdatedWithOlderOpenSslAndWithoutAppstore() { - $this->config - ->expects($this->any()) - ->method('getSystemValue') - ->willReturnMap([ - ['has_internet_connection', true, true], - ['appstoreenabled', true, false], - ]); - $this->checkSetupController - ->expects($this->once()) - ->method('getCurlVersion') - ->willReturn(['ssl_version' => 'OpenSSL/1.0.1c']); - $this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.1c). Please update your operating system or features such as Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); - } - - public function testIsUsedTlsLibOutdatedWithOlderOpenSsl1() { - $this->config->expects($this->any()) - ->method('getSystemValue') - ->willReturn(true); - $this->checkSetupController - ->expects($this->once()) - ->method('getCurlVersion') - ->willReturn(['ssl_version' => 'OpenSSL/1.0.2a']); - $this->assertSame('cURL is using an outdated OpenSSL version (OpenSSL/1.0.2a). Please update your operating system or features such as installing and updating apps via the App Store or Federated Cloud Sharing will not work reliably.', $this->invokePrivate($this->checkSetupController, 'isUsedTlsLibOutdated')); - } - public function testIsUsedTlsLibOutdatedWithMatchingOpenSslVersion() { $this->config->expects($this->any()) ->method('getSystemValue') -- 2.39.5