publish 0.8.0

This commit is contained in:
quininer 2018-10-01 01:38:42 +08:00
parent 1f98d87a62
commit f6e8f86382
2 changed files with 6 additions and 14 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "tokio-rustls" name = "tokio-rustls"
version = "0.8.0-alpha" version = "0.8.0"
authors = ["quininer kel <quininer@live.com>"] authors = ["quininer kel <quininer@live.com>"]
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
repository = "https://github.com/quininer/tokio-rustls" repository = "https://github.com/quininer/tokio-rustls"
@ -18,7 +18,7 @@ appveyor = { repository = "quininer/tokio-rustls" }
tokio = { version = "0.1.6", optional = true } tokio = { version = "0.1.6", optional = true }
bytes = { version = "0.4", optional = true } bytes = { version = "0.4", optional = true }
iovec = { version = "0.1", optional = true } iovec = { version = "0.1", optional = true }
rustls = "0.13" rustls = "0.14"
webpki = "0.18.1" webpki = "0.18.1"
[dev-dependencies] [dev-dependencies]

View File

@ -13,17 +13,17 @@ Asynchronous TLS/SSL streams for [Tokio](https://tokio.rs/) using
```rust ```rust
use webpki::DNSNameRef; use webpki::DNSNameRef;
use tokio_rustls::{ ClientConfigExt, rustls::ClientConfig }; use tokio_rustls::{ TlsConnector, rustls::ClientConfig };
// ... // ...
let mut config = ClientConfig::new(); let mut config = ClientConfig::new();
config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS);
let config = Arc::new(config); let config = TlsConnector::from(Arc::new(config));
let domain = DNSNameRef::try_from_ascii_str("www.rust-lang.org").unwrap(); let dnsname = DNSNameRef::try_from_ascii_str("www.rust-lang.org").unwrap();
TcpStream::connect(&addr) 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 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 ### Server Example Program
See [examples/server](examples/server/src/main.rs). You can run it with: See [examples/server](examples/server/src/main.rs). You can run it with: