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

Make session public in TlsStream #37

Closed
wants to merge 1 commit into from

Conversation

xpepermint
Copy link

Some very important data provided by Session are currently hidden (e.g. which protocol was selected by the handshake).

Ref: #30

@xpepermint
Copy link
Author

xpepermint commented Oct 5, 2020

@MoMannn when this is merged you'll be able to get the selected ALPN protocol like this:

use rustls::{Session}; // don't forget this
...
connector.connect("google.com", tcp_stream).await?;
socket.session.get_alpn_protocol();

@dizda
Copy link

dizda commented Nov 6, 2020

Also waiting for this feature.

@dizda
Copy link

dizda commented Nov 6, 2020

I personally need to set some stuff about the session, eg.

session.set_buffer_limit(1_000_000);

@xpepermint
Copy link
Author

Status?

@skade
Copy link
Collaborator

skade commented Dec 4, 2020

As stated on other places on this tracker, I don't want to expose rusttls types directly. async-tls is rather intended to implement high-level operations on TLS connections rather than having users implement those themselves. It's also intended to be engine-independent.

I know I'm far away from this goal, as I was sidelined, which is the reason why I put a maintenance notice out, showing a path to a structured handover to new maintainers. It's important to me though that the above design is taken over along with it.

@skade skade closed this Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants