From 198690e6b736d3501cf272fa9e4ed59f3ee08a34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 17 Nov 2019 00:30:30 +0100 Subject: [PATCH] Improve test suite to exclude TLS 1.3 tests on PHP 7.3 Explicit TLS 1.3 support will be available in PHP 7.4: https://github.com/php/php-src/pull/3909 Older PHP versions implicitly support TLS 1.3 provided that the underlying OpenSSL version supports TLS 1.3. However, for PHP 7.3 some recent changes implicitly disable TLS 1.3, so we skip TLS 1.3 tests on affected PHP versions: https://github.com/php/php-src/pull/3317 --- tests/FunctionalSecureServerTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/FunctionalSecureServerTest.php b/tests/FunctionalSecureServerTest.php index 7e7b0cc..226c380 100644 --- a/tests/FunctionalSecureServerTest.php +++ b/tests/FunctionalSecureServerTest.php @@ -50,8 +50,11 @@ public function testClientCanConnectToServer() public function testClientUsesTls13ByDefaultWhenSupportedByOpenSSL() { - if (PHP_VERSION_ID < 70000 || !$this->supportsTls13()) { - $this->markTestSkipped('Test requires PHP 7+ for crypto meta data and OpenSSL 1.1.1+ for TLS 1.3'); + if (PHP_VERSION_ID < 70000 || (PHP_VERSION_ID >= 70300 && PHP_VERSION_ID < 70400) || !$this->supportsTls13()) { + // @link https://github.com/php/php-src/pull/3909 explicitly adds TLS 1.3 on PHP 7.4 + // @link https://github.com/php/php-src/pull/3317 implicitly limits to TLS 1.2 on PHP 7.3 + // all older PHP versions support TLS 1.3 (provided OpenSSL supports it), but only PHP 7 allows checking the version + $this->markTestSkipped('Test requires PHP 7+ for crypto meta data (but excludes PHP 7.3 because it implicitly limits to TLS 1.2) and OpenSSL 1.1.1+ for TLS 1.3'); } $loop = Factory::create();