From 8e36dd4541bf567ade5c0fccfba7d78061567e4a Mon Sep 17 00:00:00 2001 From: Joseph Birr-Pixton Date: Sun, 15 Jul 2018 12:28:56 +0100 Subject: [PATCH 1/3] Update dependencies --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e36dda8..b6f8f59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "tokio-rustls" -version = "0.6.0" +version = "0.7.0" authors = ["quininer kel "] license = "MIT/Apache-2.0" repository = "https://github.com/quininer/tokio-rustls" @@ -18,8 +18,8 @@ appveyor = { repository = "quininer/tokio-rustls" } futures-core = { version = "0.2.0", optional = true } futures-io = { version = "0.2.0", optional = true } tokio = { version = "0.1.6", optional = true } -rustls = "0.12" -webpki = "0.18.0-alpha" +rustls = "0.13" +webpki = "0.18.1" [dev-dependencies] # futures = "0.2.0" From 5d6d4740804788df799ba5964b993b3fe74432fd Mon Sep 17 00:00:00 2001 From: Joseph Birr-Pixton Date: Sun, 15 Jul 2018 15:02:15 +0100 Subject: [PATCH 2/3] Also update dependencies in example code --- examples/client/Cargo.toml | 6 +++--- examples/server/Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/client/Cargo.toml b/examples/client/Cargo.toml index 2449245..6c4af55 100644 --- a/examples/client/Cargo.toml +++ b/examples/client/Cargo.toml @@ -4,14 +4,14 @@ version = "0.1.0" authors = ["quininer "] [dependencies] -rustls = "0.12" -webpki = "0.18.0-alpha" +rustls = "0.13" +webpki = "0.18.1" tokio-rustls = { path = "../..", default-features = false, features = [ "tokio" ] } tokio = "0.1" clap = "2.26" -webpki-roots = "0.14" +webpki-roots = "0.15" [target.'cfg(unix)'.dependencies] tokio-file-unix = "0.5" diff --git a/examples/server/Cargo.toml b/examples/server/Cargo.toml index 4bc4e8b..bc4e6a8 100644 --- a/examples/server/Cargo.toml +++ b/examples/server/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["quininer "] [dependencies] -rustls = "0.12" +rustls = "0.13" tokio-rustls = { path = "../..", default-features = false, features = [ "tokio" ] } tokio = { version = "0.1.6" } From a8e1e9ac35750453c62121347cf740435e238422 Mon Sep 17 00:00:00 2001 From: Joseph Birr-Pixton Date: Sun, 15 Jul 2018 15:02:42 +0100 Subject: [PATCH 3/3] Fix warnings now set_single_cert yields a Result --- examples/server/src/main.rs | 3 ++- tests/test.rs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/server/src/main.rs b/examples/server/src/main.rs index 7e59cd1..8d1718a 100644 --- a/examples/server/src/main.rs +++ b/examples/server/src/main.rs @@ -45,7 +45,8 @@ fn main() { let flag_echo = matches.occurrences_of("echo") > 0; let mut config = ServerConfig::new(NoClientAuth::new()); - config.set_single_cert(load_certs(cert_file), load_keys(key_file).remove(0)); + config.set_single_cert(load_certs(cert_file), load_keys(key_file).remove(0)) + .expect("invalid key or certificate"); let arc_config = Arc::new(config); let socket = TcpListener::bind(&addr).unwrap(); diff --git a/tests/test.rs b/tests/test.rs index 246e85a..e64dd82 100644 --- a/tests/test.rs +++ b/tests/test.rs @@ -26,7 +26,8 @@ fn start_server(cert: Vec, rsa: PrivateKey) -> SocketAddr { use tokio::io as aio; let mut config = ServerConfig::new(rustls::NoClientAuth::new()); - config.set_single_cert(cert, rsa); + config.set_single_cert(cert, rsa) + .expect("invalid key or certificate"); let config = Arc::new(config); let (send, recv) = channel();