From d0e9391968e7b2452adde9fe0becdc6d32417bb3 Mon Sep 17 00:00:00 2001 From: Geoffroy Couprie Date: Mon, 11 Sep 2023 14:46:18 +0200 Subject: [PATCH] Update tokio-tungstenite (#3643) Co-authored-by: Coenen Benjamin --- Cargo.lock | 47 +++---------------- apollo-router/Cargo.toml | 4 +- .../src/services/subgraph_service.rs | 2 +- 3 files changed, 9 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2ea7eb152b..6d20ce4600 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -380,7 +380,7 @@ dependencies = [ "tokio", "tokio-rustls 0.24.1", "tokio-stream", - "tokio-tungstenite 0.18.0", + "tokio-tungstenite", "tokio-util", "toml 0.7.6", "tonic 0.8.3", @@ -972,7 +972,7 @@ dependencies = [ "sha1 0.10.5", "sync_wrapper", "tokio", - "tokio-tungstenite 0.20.0", + "tokio-tungstenite", "tower", "tower-layer", "tower-service", @@ -6374,22 +6374,6 @@ dependencies = [ "tokio-stream", ] -[[package]] -name = "tokio-tungstenite" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54319c93411147bced34cb5609a80e0a8e44c5999c93903a81cd866630ec0bfd" -dependencies = [ - "futures-util", - "log", - "rustls 0.20.8", - "rustls-native-certs", - "tokio", - "tokio-rustls 0.23.4", - "tungstenite 0.18.0", - "webpki", -] - [[package]] name = "tokio-tungstenite" version = "0.20.0" @@ -6398,8 +6382,11 @@ checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" dependencies = [ "futures-util", "log", + "rustls 0.21.6", + "rustls-native-certs", "tokio", - "tungstenite 0.20.0", + "tokio-rustls 0.24.1", + "tungstenite", ] [[package]] @@ -6778,27 +6765,6 @@ dependencies = [ "syn 2.0.29", ] -[[package]] -name = "tungstenite" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30ee6ab729cd4cf0fd55218530c4522ed30b7b6081752839b68fcec8d0960788" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes", - "http", - "httparse", - "log", - "rand 0.8.5", - "rustls 0.20.8", - "sha1 0.10.5", - "thiserror", - "url", - "utf-8", - "webpki", -] - [[package]] name = "tungstenite" version = "0.20.0" @@ -6812,6 +6778,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", + "rustls 0.21.6", "sha1 0.10.5", "thiserror", "url", diff --git a/apollo-router/Cargo.toml b/apollo-router/Cargo.toml index 6e9eab0e03..8af25ed3df 100644 --- a/apollo-router/Cargo.toml +++ b/apollo-router/Cargo.toml @@ -226,9 +226,7 @@ uuid = { version = "1.4.1", features = ["serde", "v4"] } yaml-rust = "0.4.5" wiremock = "0.5.19" wsl = "0.1.0" -tokio-tungstenite = { version = "0.18.0", features = [ - "rustls-tls-native-roots", -] } +tokio-tungstenite = { version = "0.20.0", features = ["rustls-tls-native-roots"] } tokio-rustls = "0.24.1" http-serde = "1.1.3" hmac = "0.12.1" diff --git a/apollo-router/src/services/subgraph_service.rs b/apollo-router/src/services/subgraph_service.rs index 8ba73b4068..2d0044d488 100644 --- a/apollo-router/src/services/subgraph_service.rs +++ b/apollo-router/src/services/subgraph_service.rs @@ -542,7 +542,7 @@ async fn call_websocket( let (ws_stream, mut resp) = match request.uri().scheme_str() { Some("wss") => { - connect_async_tls_with_config(request, None, None) + connect_async_tls_with_config(request, None, false, None) .instrument(subgraph_req_span) .await }