diff --git a/Cargo.toml b/Cargo.toml index c104c28..8beb2e3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,10 +15,10 @@ base64 = "0.10" chrono = "0.4" http = "0.1" hyper = {version = "0.12", default-features = false} -hyper-tls = "0.3" +hyper-rustls = "0.16" itertools = "0.8" log = "0.3" -rustls = "0.14" +rustls = "0.15" serde = "1.0" serde_json = "1.0" serde_derive = "1.0" diff --git a/examples/test-device/Cargo.toml b/examples/test-device/Cargo.toml index 648213b..d7e9fd5 100644 --- a/examples/test-device/Cargo.toml +++ b/examples/test-device/Cargo.toml @@ -7,6 +7,6 @@ edition = "2018" [dependencies] yup-oauth2 = { path = "../../" } hyper = "0.12" -hyper-tls = "0.3" +hyper-rustls = "0.16" futures = "0.1" tokio = "0.1" diff --git a/examples/test-device/src/main.rs b/examples/test-device/src/main.rs index c24a032..7edb91c 100644 --- a/examples/test-device/src/main.rs +++ b/examples/test-device/src/main.rs @@ -2,7 +2,7 @@ use futures::prelude::*; use yup_oauth2::{self, Authenticator, GetToken}; use hyper::client::Client; -use hyper_tls::HttpsConnector; +use hyper_rustls::HttpsConnector; use std::path; use std::time::Duration; use tokio; @@ -10,7 +10,7 @@ use tokio; fn main() { let creds = yup_oauth2::read_application_secret(path::Path::new("clientsecret.json")) .expect("clientsecret"); - let https = HttpsConnector::new(1).expect("tls"); + let https = HttpsConnector::new(1); let client = Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); diff --git a/examples/test-installed/Cargo.toml b/examples/test-installed/Cargo.toml index 104183a..6e3b293 100644 --- a/examples/test-installed/Cargo.toml +++ b/examples/test-installed/Cargo.toml @@ -7,6 +7,6 @@ edition = "2018" [dependencies] yup-oauth2 = { path = "../../" } hyper = "0.12" -hyper-tls = "0.3" +hyper-rustls = "0.16" futures = "0.1" tokio = "0.1" diff --git a/examples/test-installed/src/main.rs b/examples/test-installed/src/main.rs index d11df4e..174957e 100644 --- a/examples/test-installed/src/main.rs +++ b/examples/test-installed/src/main.rs @@ -3,12 +3,12 @@ use yup_oauth2::GetToken; use yup_oauth2::{Authenticator, InstalledFlow}; use hyper::client::Client; -use hyper_tls::HttpsConnector; +use hyper_rustls::HttpsConnector; use std::path::Path; fn main() { - let https = HttpsConnector::new(1).expect("tls"); + let https = HttpsConnector::new(1); let client = Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); diff --git a/examples/test-svc-acct/Cargo.toml b/examples/test-svc-acct/Cargo.toml index 3b58bfd..7a04921 100644 --- a/examples/test-svc-acct/Cargo.toml +++ b/examples/test-svc-acct/Cargo.toml @@ -7,6 +7,6 @@ edition = "2018" [dependencies] yup-oauth2 = { path = "../../" } hyper = "0.12" -hyper-tls = "0.3" +hyper-rustls = "0.16" futures = "0.1" tokio = "0.1" diff --git a/examples/test-svc-acct/src/main.rs b/examples/test-svc-acct/src/main.rs index f9a9ee0..cf44e3d 100644 --- a/examples/test-svc-acct/src/main.rs +++ b/examples/test-svc-acct/src/main.rs @@ -4,7 +4,7 @@ use futures::prelude::*; use yup_oauth2::GetToken; use hyper::client::Client; -use hyper_tls::HttpsConnector; +use hyper_rustls::HttpsConnector; use tokio; use std::path; @@ -12,7 +12,7 @@ use std::path; fn main() { let creds = yup_oauth2::service_account_key_from_file(path::Path::new("serviceaccount.json")).unwrap(); - let https = HttpsConnector::new(1).expect("tls"); + let https = HttpsConnector::new(1); let client = Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); diff --git a/src/device.rs b/src/device.rs index b39fef7..83898b2 100644 --- a/src/device.rs +++ b/src/device.rs @@ -357,7 +357,7 @@ where #[cfg(test)] mod tests { use hyper; - use hyper_tls::HttpsConnector; + use hyper_rustls::HttpsConnector; use mockito; use tokio; @@ -380,7 +380,7 @@ mod tests { app_secret.token_uri = format!("{}/token", server_url); let device_code_url = format!("{}/code", server_url); - let https = HttpsConnector::new(1).expect("tls"); + let https = HttpsConnector::new(1); let client = hyper::Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); diff --git a/src/installed.rs b/src/installed.rs index adf3994..72b38c5 100644 --- a/src/installed.rs +++ b/src/installed.rs @@ -531,7 +531,7 @@ mod tests { use hyper; use hyper::client::connect::HttpConnector; - use hyper_tls::HttpsConnector; + use hyper_rustls::HttpsConnector; use mockito::{self, mock}; use tokio; @@ -597,7 +597,7 @@ mod tests { let mut app_secret = parse_application_secret(app_secret).unwrap(); app_secret.token_uri = format!("{}/token", server_url); - let https = HttpsConnector::new(1).expect("tls"); + let https = HttpsConnector::new(1); let client = hyper::Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); diff --git a/src/lib.rs b/src/lib.rs index 6d16901..ecc6549 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -43,13 +43,13 @@ //! use yup_oauth2::{Authenticator, InstalledFlow}; //! //! use hyper::client::Client; -//! use hyper_tls::HttpsConnector; +//! use hyper_rustls::HttpsConnector; //! //! use std::path::Path; //! //! fn main() { //! // Boilerplate: Set up hyper HTTP client and TLS. -//! let https = HttpsConnector::new(1).expect("tls"); +//! let https = HttpsConnector::new(1); //! let client = Client::builder() //! .keep_alive(false) //! .build::<_, hyper::Body>(https); diff --git a/src/refresh.rs b/src/refresh.rs index 2ad6e43..ded76f6 100644 --- a/src/refresh.rs +++ b/src/refresh.rs @@ -106,7 +106,7 @@ mod tests { use crate::helper; use hyper; - use hyper_tls::HttpsConnector; + use hyper_rustls::HttpsConnector; use mockito; use tokio; @@ -119,7 +119,7 @@ mod tests { app_secret.token_uri = format!("{}/token", server_url); let refresh_token = "my-refresh-token".to_string(); - let https = HttpsConnector::new(1).unwrap(); + let https = HttpsConnector::new(1); let client = hyper::Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); diff --git a/src/service_account.rs b/src/service_account.rs index 7dd3fa8..a215a3e 100644 --- a/src/service_account.rs +++ b/src/service_account.rs @@ -390,7 +390,7 @@ mod tests { use crate::types::GetToken; use hyper; - use hyper_tls::HttpsConnector; + use hyper_rustls::HttpsConnector; use mockito::{self, mock}; use tokio; @@ -423,7 +423,7 @@ mod tests { "token_type": "Bearer" }"#; - let https = HttpsConnector::new(1).unwrap(); + let https = HttpsConnector::new(1); let client = hyper::Client::builder() .keep_alive(false) .build::<_, hyper::Body>(https); @@ -501,7 +501,7 @@ mod tests { #[allow(dead_code)] fn test_service_account_e2e() { let key = service_account_key_from_file(&TEST_PRIVATE_KEY_PATH.to_string()).unwrap(); - let https = HttpsConnector::new(4).unwrap(); + let https = HttpsConnector::new(4); let runtime = tokio::runtime::Runtime::new().unwrap(); let client = hyper::Client::builder() .executor(runtime.executor())