Async TLS for the Tokio runtime
Go to file
2017-03-16 10:18:19 +08:00
examples [Changed] update tokio-io 2017-03-16 10:15:06 +08:00
src [Fixed] feature tokio-proto 2017-03-16 10:17:30 +08:00
.gitignore [Added] init 2017-02-21 11:59:05 +08:00
.gitjournal.toml [Added] init 2017-02-21 11:59:05 +08:00
Cargo.toml [Changed] bump to 0.1.4 2017-03-16 10:18:19 +08:00
LICENSE-APACHE [Added] README and more 2017-02-27 21:02:35 +08:00
LICENSE-MIT [Added] README and more 2017-02-27 21:02:35 +08:00
README.md [Improved] MidHandshake/TlsStream 2017-02-27 21:02:35 +08:00

tokio-rustls

crates license docs.rs

tokio-tls fork, use rustls.

exmaple

// ...

use rustls::ClientConfig;
use tokio_rustls::ClientConfigExt;

let mut config = ClientConfig::new();
config.root_store.add_trust_anchors(&webpki_roots::ROOTS);
let config = Arc::new(config);

TcpStream::connect(&addr, &handle)
	.and_then(|socket| config.connect_async("www.rust-lang.org", socket))

// ...