summaryrefslogtreecommitdiffstats
path: root/php-react-socket.198690e.patch
blob: b213982dd543598a38d1938c45cd1df3040b7a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 198690e6b736d3501cf272fa9e4ed59f3ee08a34 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20L=C3=BCck?= <christian@clue.engineering>
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();