From f6e8f86382330143b3fdc8d82eac1eba09616db6 Mon Sep 17 00:00:00 2001 From: quininer Date: Mon, 1 Oct 2018 01:38:42 +0800 Subject: [PATCH] publish 0.8.0 --- Cargo.toml | 4 ++-- README.md | 16 ++++------------ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ec25a73..b4cd9e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tokio-rustls" -version = "0.8.0-alpha" +version = "0.8.0" authors = ["quininer kel "] license = "MIT/Apache-2.0" repository = "https://github.com/quininer/tokio-rustls" @@ -18,7 +18,7 @@ appveyor = { repository = "quininer/tokio-rustls" } tokio = { version = "0.1.6", optional = true } bytes = { version = "0.4", optional = true } iovec = { version = "0.1", optional = true } -rustls = "0.13" +rustls = "0.14" webpki = "0.18.1" [dev-dependencies] diff --git a/README.md b/README.md index 45d85b5..f22e97e 100644 --- a/README.md +++ b/README.md @@ -13,17 +13,17 @@ Asynchronous TLS/SSL streams for [Tokio](https://tokio.rs/) using ```rust use webpki::DNSNameRef; -use tokio_rustls::{ ClientConfigExt, rustls::ClientConfig }; +use tokio_rustls::{ TlsConnector, rustls::ClientConfig }; // ... let mut config = ClientConfig::new(); config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); -let config = Arc::new(config); -let domain = DNSNameRef::try_from_ascii_str("www.rust-lang.org").unwrap(); +let config = TlsConnector::from(Arc::new(config)); +let dnsname = DNSNameRef::try_from_ascii_str("www.rust-lang.org").unwrap(); TcpStream::connect(&addr) - .and_then(|socket| config.connect_async(domain, socket)) + .and_then(move |socket| config.connect(dnsname, socket)) // ... ``` @@ -37,14 +37,6 @@ cd examples/client cargo run -- hsts.badssl.com ``` -Currently on Windows the example client reads from stdin and writes to stdout using -blocking I/O. Until this is fixed, do something this on Windows: - -```sh -cd examples/client -echo | cargo run -- hsts.badssl.com -``` - ### Server Example Program See [examples/server](examples/server/src/main.rs). You can run it with: