Bug #73388 [Opn->Asn]: STREAM_CRYPTO_METHOD_TLS_CLIENT restricted to TLS1.0 only
| From: | kalle@php.net | Date: | Wed, 26 Oct 2016 09:11:25 +0000 |
| Subject: | Bug #73388 [Opn->Asn]: STREAM_CRYPTO_METHOD_TLS_CLIENT restricted to TLS1.0 only | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-205020@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73388&edit=1
ID: 73388
Updated by: kalle@php.net
Reported by: arjen at parse dot nl
Summary: STREAM_CRYPTO_METHOD_TLS_CLIENT restricted to TLS1.0
only
-Status: Open
+Status: Assigned
Type: Bug
Package: OpenSSL related
Operating System: Linux
PHP Version: 7.0.12
-Assigned To:
+Assigned To: rdlowrey
Block user comment: N
Private report: N
New Comment:
It seems reasonable to expose this constant, assigning it to you Daniel as you did the bug fix
commit back then :)
Previous Comments:
------------------------------------------------------------------------
[2016-10-26 07:56:40] arjen at parse dot nl
And the STREAM_CRYPTO_METHOD_TLS_ANY_CLIENT constant created in https://github.com/php/php-src/commit/10bc5fd4c4c8e1dd57bd911b086e9872a56300a0
should be exposed as constant in userland in https://github.com/php/php-src/blob/6053987bc27e8dede37f437193a5cad448f99bce/ext/standard/file.c#L223
------------------------------------------------------------------------
[2016-10-26 07:48:29] arjen at parse dot nl
Description:
------------
In 5.6 some openssl improvements were made: http://php.net/manual/en/migration56.openssl.php
The changelog mentions STREAM_CRYPTO_METHOD_TLS_CLIENT as constant for any TLS version.
Because of BC, this was reverted in https://bugs.php.net/bug.php?id=69195
STREAM_CRYPTO_METHOD_TLS_CLIENT is now TLSv1.0 only, while STREAM_CRYPTO_METHOD_SSLv23_CLIENT =
STREAM_CRYPTO_METHOD_TLSv1_0_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
(see http://php.net/manual/en/function.stream-socket-enable-crypto.php#119122)
We started using the STREAM_CRYPTO_METHOD_TLS_CLIENT constant with 5.6.0 and now found out we
couldn't connect to a service only supporting TLS v1.1 and v1.2 So by following the changelog
and using a TLS_CLIENT specific constant, we ended up in a situation with WORSE TLS version
support...
A quick search on github on STREAM_CRYPTO_METHOD_TLS_CLIENT language:PHP returns 207,607
occurrences, while STREAM_CRYPTO_METHOD_SSLv23_CLIENT returns 28,956 results.
Solution: STREAM_CRYPTO_METHOD_TLS_CLIENT should also enable
STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT|STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73388&edit=1