#openssl #tide #tls #https #async-std

tide-openssl

tide openssl listener based on async-std-openssl. Based on http-rs/tide-rustls

2 releases

0.1.1 Aug 26, 2021
0.1.0 Aug 19, 2021

#863 in HTTP server

Download history 27/week @ 2024-03-30 2/week @ 2024-04-06

2,817 downloads per month

MIT/Apache

24KB
385 lines

Tide openssl listener

openssl listener for tide using async-std-openssl

Based on tide-rustls

Using with tide

#[async_std::main]
async fn main() -> tide::Result<()> {
    let mut app = tide::new();
    app.at("/").get(|_| async { Ok("Hello TLS") });
    app.listen(
        TlsListener::build()
            .addrs("localhost:4433")
            .cert(std::env::var("TIDE_CERT_PATH").unwrap())
            .key(std::env::var("TIDE_KEY_PATH").unwrap()),
        )
        .await?;
    Ok(())
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~12–25MB
~367K SLoC