From 4ac13e405ee49284dcb3bc66bc274e9155c48d3f Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Fri, 1 Oct 2021 16:43:32 +1000 Subject: [PATCH] Make sure we can request HTTPS urls --- Cargo.lock | 19 +++++++++++++++++++ daemon/Cargo.toml | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index ec8d4b0..83db38a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1003,6 +1003,21 @@ dependencies = [ "want", ] +[[package]] +name = "hyper-rustls" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" +dependencies = [ + "futures-util", + "hyper", + "log", + "rustls 0.19.1", + "tokio", + "tokio-rustls", + "webpki", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1775,6 +1790,7 @@ dependencies = [ "http", "http-body", "hyper", + "hyper-rustls", "ipnet", "js-sys", "lazy_static", @@ -1782,14 +1798,17 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", + "rustls 0.19.1", "serde", "serde_json", "serde_urlencoded", "tokio", + "tokio-rustls", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots 0.21.1", "winreg", ] diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index 4758bc6..7b259f1 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -15,7 +15,7 @@ futures = { version = "0.3", default-features = false } hex = "0.4" hkdf = "0.11" rand = "0.6" -reqwest = { version = "0.11", default-features = false, features = ["json"] } +reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls-webpki-roots"] } rocket = { version = "0.5.0-rc.1", features = ["json"] } rocket-basicauth = { version = "2", default-features = false } rocket_db_pools = { git = "https://github.com/SergioBenitez/Rocket", features = ["sqlx_sqlite"] }