Re: [RFC] openssl_get_channel_binding
| From: | Jakub Zelenka | Date: | Tue, 17 Nov 2026 14:45:26 +0000 |
| Subject: | Re: [RFC] openssl_get_channel_binding | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-133114@lists.php.net to get a copy of this message | ||
Hi,
Sorry for being late in the discussion.
On Tue, Oct 27, 2026 at 10:33 AM Sjoerd Langkemper <sjoerd-php@linuxonly.nl>
wrote:
> Hello,
>
> I have created an RFC to add the function openssl_get_channel_binding:
> https://wiki.php.net/rfc/openssl_get_channel_binding
>
> PR: https://github.com/php/php-src/pull/24035
>
>
I'm not sure if it's a good idea to support tls-unique . It doesn't work on
TLS 1.3 and it is also vulnerable to triple handshake for TLS 1.2 so it's
something that peoples should not probably use. I guess maybe just for some
legacy but it should be clear that this is not the method that one should
ideally not use.
Honestly I would prefer if there was first OpenSSL API for this so PHP has
this just as a fallback method for older version and we can eventually drop
it in the future which is how most other things are implemented in OpenSSL
ext. The https://github.com/openssl/openssl/issues/18893
needs just someone
to actually create the PR and then to get reviews. It will also get more
eyes. so my preference would be to start with that.
The biggest issue for me is the API. Why does it introduce 3rd new method
how to get data from stream? Currently we either get from through context
(e.g. requested capture_peer_cert that is then returned in
stream_get_meta_data) or through the stream function like recently
introduced stream_socket_get_crypto_status. This is what should be done as
otherwise we end up with hacks in the code like those `stream->ops ==
&php_openssl_socket_ops` checks. So my preference here is really to use a
stream function (or potentially just meta data) and not introduce openssl
function because it's inconsistent and hacky.
Kind regards,
Jakub