From 125bb684b8307c1b45787f8da38b5f9d05564797 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 09:16:20 +0100 Subject: [PATCH] Bump tokio-tungstenite from 0.24.0 to 0.26.0 (#1225) * Bump tokio-tungstenite from 0.24.0 to 0.26.0 Bumps [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite) from 0.24.0 to 0.26.0. - [Changelog](https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md) - [Commits](https://github.com/snapview/tokio-tungstenite/compare/v0.24.0...v0.26.0) --- updated-dependencies: - dependency-name: tokio-tungstenite dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * Updates for latest version of tungstenite --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: peg --- Cargo.lock | 38 +++++++++++++++++-- crates/protocol/Cargo.toml | 2 +- crates/protocol/src/protocol_transport/mod.rs | 8 ++-- crates/threshold-signature-server/Cargo.toml | 2 +- 4 files changed, 40 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 87c185317..57fbb2c5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -675,7 +675,7 @@ dependencies = [ "sha1", "sync_wrapper 1.0.1", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.24.0", "tower 0.5.1", "tower-layer", "tower-service", @@ -2644,7 +2644,7 @@ dependencies = [ "synedrion", "thiserror 2.0.8", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.26.0", "tracing", "wasm-bindgen", "wasm-bindgen-derive", @@ -2860,7 +2860,7 @@ dependencies = [ "tdx-quote", "thiserror 2.0.8", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.26.0", "tower-http 0.6.2", "tracing", "tracing-bunyan-formatter", @@ -14570,7 +14570,19 @@ dependencies = [ "futures-util", "log", "tokio", - "tungstenite", + "tungstenite 0.24.0", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c14b3e8ebea4eb2577de77903e6c008d9ac80b5aae1f9ae781c5229ae935a44" +dependencies = [ + "futures-util", + "log", + "tokio", + "tungstenite 0.26.0", ] [[package]] @@ -15034,6 +15046,24 @@ dependencies = [ "utf-8", ] +[[package]] +name = "tungstenite" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4ab519cc9c1e57e6cab1087f262f9fc978a4e9d5f943b0e029567521d3525cb" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 1.1.0", + "httparse", + "log", + "rand", + "sha1", + "thiserror 2.0.8", + "utf-8", +] + [[package]] name = "twox-hash" version = "1.6.3" diff --git a/crates/protocol/Cargo.toml b/crates/protocol/Cargo.toml index 36b5ea286..8f246a69b 100644 --- a/crates/protocol/Cargo.toml +++ b/crates/protocol/Cargo.toml @@ -35,7 +35,7 @@ num ="0.4.3" # Used only with the `server` feature to implement the WsConnection trait axum ={ version="0.7.9", features=["ws"], optional=true } -tokio-tungstenite={ version="0.24.0", optional=true } +tokio-tungstenite={ version="0.26.0", optional=true } # Used only with the `wasm` feature gloo-net ={ version="0.6.0", default-features=false, features=["websocket"], optional=true } diff --git a/crates/protocol/src/protocol_transport/mod.rs b/crates/protocol/src/protocol_transport/mod.rs index 4fff145dd..8b86d5663 100644 --- a/crates/protocol/src/protocol_transport/mod.rs +++ b/crates/protocol/src/protocol_transport/mod.rs @@ -106,14 +106,14 @@ impl WsConnection for tokio_tungstenite::WebSocketStream) -> Result<(), WsError> { - SinkExt::send(&mut self, tungstenite::Message::Binary(msg)) + SinkExt::send(&mut self, tungstenite::Message::Binary(msg.into())) .await .map_err(|_| WsError::ConnectionClosed) } @@ -130,14 +130,14 @@ impl WsConnection for tokio_tungstenite::WebSocketStream .ok_or(WsError::ConnectionClosed)? .map_err(|e| WsError::ConnectionError(e.to_string()))? { - Ok(msg) + Ok(msg.to_vec()) } else { Err(WsError::UnexpectedMessageType) } } async fn send(&mut self, msg: Vec) -> Result<(), WsError> { - SinkExt::send(&mut self, tungstenite::Message::Binary(msg)) + SinkExt::send(&mut self, tungstenite::Message::Binary(msg.into())) .await .map_err(|_| WsError::ConnectionClosed) } diff --git a/crates/threshold-signature-server/Cargo.toml b/crates/threshold-signature-server/Cargo.toml index fa050d9aa..f641a0043 100644 --- a/crates/threshold-signature-server/Cargo.toml +++ b/crates/threshold-signature-server/Cargo.toml @@ -58,7 +58,7 @@ tracing-bunyan-formatter="0.3.10" uuid ={ version="1.11.0", features=["v4"] } # Misc -tokio-tungstenite="0.24.0" +tokio-tungstenite="0.26.0" bincode="1.3.3" bip32={ version="0.5.2" } bip39={ version="2.1.0", features=["zeroize"] }