tide-rustls
tide-rustls copied to clipboard
"how do I" - TLS connection information
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?
Not yet, thanks for the suggestion! I'll put some thought into the right way to expose this :thumbsup:
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.