Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ infer = "0.19"
hex = "0.4"
ed25519-dalek = "=3.0.0-rc.0"
tokio = { version = "1", features = ["fs", "sync", "rt", "macros", "time", "net", "io-util"] }
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-webpki-roots"] }
# Match reqwest's platform trust behavior so native WebSockets can reach
# relays secured by an OS-trusted private CA.
tokio-tungstenite = { version = "0.29", features = ["rustls-tls-native-roots"] }
tokio-util = { version = "0.7", features = ["rt"] }
bytes = "1"
futures-util = "0.3"
Expand Down
16 changes: 16 additions & 0 deletions desktop/src-tauri/src/native_websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,22 @@ mod tests {
Channel::new(|_: InvokeResponseBody| Ok(()))
}

#[tokio::test]
#[ignore = "requires BUZZ_TEST_WSS_URL and network access"]
async fn configured_wss_trusts_native_platform_roots() {
install_crypto_provider();
let url = std::env::var("BUZZ_TEST_WSS_URL")
.expect("BUZZ_TEST_WSS_URL must name the WSS endpoint to verify");

tokio::time::timeout(
CONNECT_TIMEOUT,
tokio_tungstenite::connect_async(url.as_str()),
)
.await
.expect("configured WSS endpoint should complete before the connection timeout")
.expect("configured WSS endpoint should trust the platform certificate store");
}

#[tokio::test]
async fn secure_websocket_reaches_tls_without_panicking() {
install_crypto_provider();
Expand Down
Loading