Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC 9266: Channel Bindings for TLS 1.3 support #11

Open
Neustradamus opened this issue Nov 19, 2023 · 5 comments
Open

RFC 9266: Channel Bindings for TLS 1.3 support #11

Neustradamus opened this issue Nov 19, 2023 · 5 comments
Labels
enhancement upstream-fix-needed Waiting for upstream fixes

Comments

@Neustradamus
Copy link

Neustradamus commented Nov 19, 2023

Can you add the support of RFC 9266: Channel Bindings for TLS 1.3?

Channel Bindings for TLS: https://datatracker.ietf.org/doc/html/rfc5929

Little details, to know easily:

  • tls-unique for TLS =< 1.2
  • tls-server-end-point
  • tls-exporter for TLS = 1.3

I think that you have seen the jabber.ru MITM and Channel Binding is the solution:

Thanks in advance.

Linked to:

@fabiang
Copy link
Owner

fabiang commented Nov 20, 2023

Thank for opening this issue.

I've read a bit about this here: https://csb.stevekerrison.com/post/2022-05-scram-detail/

I've also found your issue openssl/openssl#18893 and openssl/openssl#12221. So I guess we need to wait for OpenSSL having an API to get the correct data and this also must be supported by PHP first.

@fabiang fabiang added the upstream-fix-needed Waiting for upstream fixes label Nov 20, 2023
@Neustradamus
Copy link
Author

@fabiang: Thanks for your answer!

Hope that the @openssl team will see about it for all projects in the World.

@fabiang
Copy link
Owner

fabiang commented Mar 28, 2024

So I've did some research regarding this issue again. Is see that OpenSSL has SSL_export_keying_material for tls-exporter channel binding type implemented. For tls-uniquethey have SSL_get_finished/SSL_get_peer_finished available. The only thing they are missing is a simple API for both methods, right?

So this means we "only" need those methods exposed by PHPs OpenSSL extension. Python seems to have an API for this for example: https://docs.python.org/3/library/ssl.html#ssl.SSLSocket.get_channel_binding. For PHP we would need something like stream_socket_crypto_channel_binding(resource $stream, string $channelBindingType) which could return an object for each channel binding type available.

@Neustradamus
Copy link
Author

@fabiang: Have you looked for tls-server-end-point too?

@fabiang
Copy link
Owner

fabiang commented Mar 28, 2024

@Neustradamus afaics it's not possible to extract cert data from an open stream in PHP. The user of this library could have to make a second connection to the server host and return the certificate data to this library. Not very practical too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement upstream-fix-needed Waiting for upstream fixes
Projects
None yet
Development

No branches or pull requests

2 participants