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 0 | 0 | 1 | 0 |
| 0.9.1 | 0 | 0 | 0 | 1 | 0 |
| 0.9.0 | 0 | 0 | 0 | 1 | 0 |
| 0.8.1 | 0 | 0 | 0 | 1 | 0 |
| 0.8.0 | 0 | 0 | 0 | 1 | 0 |
| 0.7.2 | 0 | 0 | 0 | 1 | 0 |
| 0.7.1 | 0 | 0 | 0 | 1 | 0 |
| 0.7.0 | 0 | 0 | 0 | 1 | 0 |
| 0.6.0 | 0 | 0 | 0 | 1 | 0 |
| 0.5.0 | 0 | 0 | 0 | 1 | 0 |
| 0.4.0 | 0 | 0 | 0 | 1 | 0 |
| 0.3.1 | 0 | 0 | 0 | 1 | 0 |
| 0.3.0 | 0 | 0 | 0 | 1 | 0 |
| 0.2.4 | 0 | 0 | 0 | 1 | 0 |
| 0.2.3 | 0 | 0 | 0 | 1 | 0 |
| 0.2.2 | 0 | 0 | 0 | 1 | 0 |
| 0.2.1 | 0 | 0 | 0 | 1 | 0 |
| 0.2.0 | 0 | 0 | 0 | 1 | 0 |
| 0.1.7 | 0 | 0 | 0 | 1 | 0 |
| 0.1.6 | 0 | 0 | 0 | 1 | 0 |
| 0.1.5 | 0 | 0 | 0 | 1 | 0 |
| 0.1.4 | 0 | 0 | 0 | 1 | 0 |
| 0.1.3 | 0 | 0 | 0 | 1 | 0 |
| 0.1.2 | 0 | 0 | 0 | 1 | 0 |
| 0.1.1 | 0 | 0 | 0 | 1 | 0 |
| 0.1.0 | 0 | 0 | 0 | 1 | 0 |
0.26.4 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
MIT - MIT LicenseAsynchronous TLS/SSL streams for Tokio using Rustls.
use rustls_pki_types::ServerName;
use std::sync::Arc;
use tokio::net::TcpStream;
use tokio_rustls::rustls::{ClientConfig, RootCertStore};
use tokio_rustls::TlsConnector;
// ...
let mut root_cert_store = RootCertStore::empty();
root_cert_store.extend(webpki_roots::TLS_SERVER_ROOTS.iter().cloned());
let config = ClientConfig::builder()
.with_root_certificates(root_cert_store)
.with_no_client_auth();
let connector = TlsConnector::from(Arc::new(config));
let dnsname = ServerName::try_from("www.rust-lang.org").unwrap();
let stream = TcpStream::connect(&addr).await?;
let mut stream = connector.connect(dnsname, stream).await?;
// ...See examples/client.rs. You can run it with:
cargo run --example client -- hsts.badssl.comSee examples/server.rs. You can run it with:
cargo run --example server -- 127.0.0.1:8000 --cert certs/cert.pem --key certs/cert.key.pemIf you don't have a certificate and key, you can generate a random key and self-signed certificate for testing with:
cargo install --locked rustls-cert-gen
rustls-cert-gen --output certs/ --san localhostThis project is licensed under either of
at your option.
This started as a fork of tokio-tls.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in tokio-rustls by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.