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

"how do I" - TLS connection information #5

Open
Spindel opened this issue Nov 4, 2020 · 2 comments
Open

"how do I" - TLS connection information #5

Spindel opened this issue Nov 4, 2020 · 2 comments
Assignees

Comments

@Spindel
Copy link

Spindel commented Nov 4, 2020

I'd like to be able to access the rustls::Session object, in order to access the metadata information on it ( get_negotiated_ciphersuite, get_peer_certificates , etc.)

However, I seem to be getting lost in the layers of tide / async_rustls wrappings and I end up unable to really figure it out.

Is there some (easy?) way to access that metadata?

@jbr
Copy link
Member

jbr commented Nov 4, 2020

Not yet, thanks for the suggestion! I'll put some thought into the right way to expose this 👍

@jbr jbr self-assigned this Nov 4, 2020
@Spindel
Copy link
Author

Spindel commented Nov 4, 2020

Thanks!

To be clear, rustls::Session is the common trait for ClientSession/ServerSession structs, (documented here, https://docs.rs/rustls/0.18.1/rustls/trait.Session.html )

It should be accessible via the rustls Stream struct as ".sess" ( https://docs.rs/rustls/0.18.1/rustls/struct.Stream.html ) where one also can get the socket, which is needed to get the remote pair of ip/port data.

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

No branches or pull requests

2 participants