diff --git a/tests/TestCase/Http/Client/Auth/OauthTest.php b/tests/TestCase/Http/Client/Auth/OauthTest.php index 09e53b03b1c..f2d03a25e9b 100644 --- a/tests/TestCase/Http/Client/Auth/OauthTest.php +++ b/tests/TestCase/Http/Client/Auth/OauthTest.php @@ -375,10 +375,17 @@ public function testRsaSigningString(): void 'privateKey' => $privateKey, ]; $auth = new Oauth(); - $request = $auth->authentication($request, $options); - - $result = $request->getHeaderLine('Authorization'); - $this->assertSignatureFormat($result); + try { + $request = $auth->authentication($request, $options); + $result = $request->getHeaderLine('Authorization'); + $this->assertSignatureFormat($result); + } catch (RuntimeException $e) { + // Handle 22.04 + OpenSSL bug. This should be safe to remove in the future. + if (strpos($e->getMessage(), 'unexpected eof while reading') !== false) { + $this->markTestSkipped('Skipping because of OpenSSL bug.'); + } + throw $e; + } } public function testRsaSigningInvalidKey(): void