Async TLS for the Tokio runtime
Go to file
2017-02-28 08:56:11 +08:00
examples [Fixed] TlsStream should not check poll_write 2017-02-28 08:56:11 +08:00
src [Fixed] TlsStream should not check poll_write 2017-02-28 08:56:11 +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 [Improved] TlsStream impl poll_{read, write} 2017-02-27 21:02:35 +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))

// ...