http-rs / tide-rustls Goto Github PK
View Code? Open in Web Editor NEWTLS listener for tide based on rustls
TLS listener for tide based on rustls
async-tls yanked the 0.10.2 release, so tide-rustls 0.15.0 won't build
afaict the TlsListenerConfig currently requires sending it PathBuf's, which eventually opens/reads the keys and certs, it would be nice if there were a way to pass it an &[u8]
or more likely something implementing the Read
trait, so you can use keys and certs that aren't stored on the filesystem.
TlsListener::build()
.addrs("localhost:4433")
.cert(cert_path)
.key(key_path),
Are there any plans to support mTLS?
tide = "0.16.0"
tide-rustls = "0.2.0"
When running the example provided, I'm getting the trait bound error mentioned in the title, specifically:
the trait bound `tide_rustls::TlsListenerBuilder<_>: tide::listener::ToListener<()>` is not satisfied
the trait `tide::listener::ToListener<()>` is not implemented for `tide_rustls::TlsListenerBuilder<_>`
Here is the code I'm using to implement:
#[async_std::main]
async fn main() -> tide::Result<()> {
let mut test_app = tide::new();
test_app.at("/").get(|_| async { Ok("test") });
let test_listener = TlsListener::build()
.addrs("0.0.0.0:4000")
.cert(std::env::var("SERVER_CERT_PATH").unwrap())
.key(std::env::var("SERVER_KEY_PATH").unwrap())
.finish();
app.listen(listener).await?;
Ok(())
}
I am a rust novice, and so the likelihood of this being user error is very high, however, I wanted to post here in the event that there is a new trait from tide
that needs to be implemented for recent versions.
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?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.