diff --git a/Cargo.Bazel.Fuzzing.json.lock b/Cargo.Bazel.Fuzzing.json.lock index a48154a1074..7224167899c 100644 --- a/Cargo.Bazel.Fuzzing.json.lock +++ b/Cargo.Bazel.Fuzzing.json.lock @@ -1,5 +1,5 @@ { - "checksum": "83c1c55ae044a8cbfcf5c995793a693b648295d26376ab9ee73904895a9697e1", + "checksum": "19bf7040fe41cea96df06d9f8819f8cce0416dee3efc6d996880e1fd3ce764dd", "crates": { "abnf 0.12.0": { "name": "abnf", @@ -4989,7 +4989,7 @@ "target": "pin_project_lite" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -5099,7 +5099,7 @@ "target": "pin_project_lite" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -17909,7 +17909,7 @@ "target": "rustc_hash" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -26846,7 +26846,7 @@ "target": "log" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -27141,7 +27141,7 @@ "target": "hyper_rustls" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls", "alias": "rusttls" }, @@ -33016,7 +33016,7 @@ "target": "rand" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -37316,7 +37316,7 @@ "target": "reqwest" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -48574,7 +48574,7 @@ "target": "rustc_hash" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -48661,7 +48661,7 @@ "target": "rustc_hash" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -51476,7 +51476,7 @@ "target": "pin_project_lite" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -53863,14 +53863,14 @@ ], "license_file": "LICENSE-APACHE" }, - "rustls 0.21.10": { + "rustls 0.21.12": { "name": "rustls", - "version": "0.21.10", + "version": "0.21.12", "package_url": "https://github.com/rustls/rustls", "repository": { "Http": { - "url": "https://static.crates.io/crates/rustls/0.21.10/download", - "sha256": "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" + "url": "https://static.crates.io/crates/rustls/0.21.12/download", + "sha256": "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" } }, "targets": [ @@ -53926,7 +53926,7 @@ "target": "ring" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "build_script_build" }, { @@ -53941,7 +53941,7 @@ "selects": {} }, "edition": "2021", - "version": "0.21.10" + "version": "0.21.12" }, "build_script_attrs": { "data_glob": [ @@ -63912,7 +63912,7 @@ "deps": { "common": [ { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -76967,7 +76967,7 @@ "rust_decimal 1.32.0", "rust_decimal_macros 1.32.0", "rustc-hash 1.1.0", - "rustls 0.21.10", + "rustls 0.21.12", "rustls 0.22.2", "rustls-native-certs 0.7.0", "rustls-pemfile 1.0.3", diff --git a/Cargo.Bazel.Fuzzing.toml.lock b/Cargo.Bazel.Fuzzing.toml.lock index 3be1ac62f45..5fc2ab33c36 100644 --- a/Cargo.Bazel.Fuzzing.toml.lock +++ b/Cargo.Bazel.Fuzzing.toml.lock @@ -879,7 +879,7 @@ dependencies = [ "http-body 0.4.5", "hyper 0.14.27", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "tokio", "tokio-rustls 0.24.1", @@ -901,7 +901,7 @@ dependencies = [ "hyper 1.2.0", "hyper-util", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 2.0.0", "tokio", "tokio-rustls 0.24.1", @@ -3126,7 +3126,7 @@ dependencies = [ "rust_decimal", "rust_decimal_macros", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "rustls 0.22.2", "rustls-native-certs 0.7.0", "rustls-pemfile 1.0.3", @@ -4659,7 +4659,7 @@ dependencies = [ "http 0.2.9", "hyper 0.14.27", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", @@ -4696,7 +4696,7 @@ dependencies = [ "http 0.2.9", "hyper 0.14.27", "hyper-rustls 0.24.2", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "thiserror", "tokio", @@ -5743,7 +5743,7 @@ dependencies = [ "pem 3.0.2", "pin-project", "rand 0.8.5", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "secrecy", "serde", @@ -6427,7 +6427,7 @@ dependencies = [ "rand 0.8.5", "regex", "reqwest 0.11.27", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "serde", "serde_yaml 0.8.26", @@ -8251,7 +8251,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "thiserror", "tokio", "tracing", @@ -8267,7 +8267,7 @@ dependencies = [ "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "slab", "thiserror", @@ -8719,7 +8719,7 @@ dependencies = [ "once_cell", "percent-encoding 2.3.0", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "serde", "serde_json", @@ -9097,9 +9097,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.7", @@ -10730,7 +10730,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] diff --git a/Cargo.Bazel.json.lock b/Cargo.Bazel.json.lock index 62b89d569e9..888859f0071 100644 --- a/Cargo.Bazel.json.lock +++ b/Cargo.Bazel.json.lock @@ -1,5 +1,5 @@ { - "checksum": "75045ed3afdd266db7264baf47597f6d2bbaf4fd776bebcc0d5e0c364d593a86", + "checksum": "be48864e2f17aac6ff7b4fad13b2ccb02d9970020edbff50f019b0fd960d8e73", "crates": { "abnf 0.12.0": { "name": "abnf", @@ -5003,7 +5003,7 @@ "target": "pin_project_lite" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -5113,7 +5113,7 @@ "target": "pin_project_lite" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -17742,7 +17742,7 @@ "target": "rustc_hash" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -26702,7 +26702,7 @@ "target": "log" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -26997,7 +26997,7 @@ "target": "hyper_rustls" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls", "alias": "rusttls" }, @@ -32872,7 +32872,7 @@ "target": "rand" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -37251,7 +37251,7 @@ "target": "reqwest" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -48440,7 +48440,7 @@ "target": "rustc_hash" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -48527,7 +48527,7 @@ "target": "rustc_hash" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -51296,7 +51296,7 @@ "target": "pin_project_lite" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -53805,14 +53805,14 @@ ], "license_file": "LICENSE-APACHE" }, - "rustls 0.21.10": { + "rustls 0.21.12": { "name": "rustls", - "version": "0.21.10", + "version": "0.21.12", "package_url": "https://github.com/rustls/rustls", "repository": { "Http": { - "url": "https://static.crates.io/crates/rustls/0.21.10/download", - "sha256": "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" + "url": "https://static.crates.io/crates/rustls/0.21.12/download", + "sha256": "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" } }, "targets": [ @@ -53868,7 +53868,7 @@ "target": "ring" }, { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "build_script_build" }, { @@ -53883,7 +53883,7 @@ "selects": {} }, "edition": "2021", - "version": "0.21.10" + "version": "0.21.12" }, "build_script_attrs": { "data_glob": [ @@ -63884,7 +63884,7 @@ "deps": { "common": [ { - "id": "rustls 0.21.10", + "id": "rustls 0.21.12", "target": "rustls" }, { @@ -76862,7 +76862,7 @@ "rust_decimal 1.30.0", "rust_decimal_macros 1.30.0", "rustc-hash 1.1.0", - "rustls 0.21.10", + "rustls 0.21.12", "rustls 0.22.2", "rustls-native-certs 0.7.0", "rustls-pemfile 1.0.3", diff --git a/Cargo.Bazel.toml.lock b/Cargo.Bazel.toml.lock index 99633be035d..a992472527a 100644 --- a/Cargo.Bazel.toml.lock +++ b/Cargo.Bazel.toml.lock @@ -881,7 +881,7 @@ dependencies = [ "http-body 0.4.5", "hyper 0.14.27", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "tokio", "tokio-rustls 0.24.1", @@ -903,7 +903,7 @@ dependencies = [ "hyper 1.2.0", "hyper-util", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 2.0.0", "tokio", "tokio-rustls 0.24.1", @@ -3116,7 +3116,7 @@ dependencies = [ "rust_decimal", "rust_decimal_macros", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "rustls 0.22.2", "rustls-native-certs 0.7.0", "rustls-pemfile 1.0.3", @@ -4650,7 +4650,7 @@ dependencies = [ "http 0.2.9", "hyper 0.14.27", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "tokio", "tokio-rustls 0.24.1", @@ -4687,7 +4687,7 @@ dependencies = [ "http 0.2.9", "hyper 0.14.27", "hyper-rustls 0.24.2", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "thiserror", "tokio", @@ -5734,7 +5734,7 @@ dependencies = [ "pem 3.0.3", "pin-project", "rand 0.8.5", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "secrecy", "serde", @@ -6425,7 +6425,7 @@ dependencies = [ "rand 0.8.5", "regex", "reqwest 0.11.27", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "serde", "serde_yaml 0.8.26", @@ -8257,7 +8257,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "thiserror", "tokio", "tracing", @@ -8273,7 +8273,7 @@ dependencies = [ "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.3", "slab", "thiserror", @@ -8721,7 +8721,7 @@ dependencies = [ "once_cell", "percent-encoding 2.3.0", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.3", "serde", "serde_json", @@ -9115,9 +9115,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.7", @@ -10749,7 +10749,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] diff --git a/Cargo.lock b/Cargo.lock index a047530b9da..0fade11b23b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -845,7 +845,7 @@ dependencies = [ "http-body 0.4.5", "hyper 0.14.26", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "tokio", "tokio-rustls 0.24.1", @@ -867,7 +867,7 @@ dependencies = [ "hyper 1.2.0", "hyper-util", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 2.0.0", "tokio", "tokio-rustls 0.24.1", @@ -4880,7 +4880,7 @@ dependencies = [ "http 0.2.9", "hyper 0.14.26", "log", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.2", "tokio", "tokio-rustls 0.24.1", @@ -5420,7 +5420,7 @@ dependencies = [ "rcgen", "regex", "reqwest 0.11.22", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_bytes", @@ -5629,7 +5629,7 @@ dependencies = [ "prost", "rand 0.8.5", "rand_chacha 0.3.1", - "rustls 0.21.10", + "rustls 0.21.12", "serde", "serde_cbor", "tokio", @@ -7193,9 +7193,9 @@ dependencies = [ "ic-types-test-utils", "rand 0.8.5", "rand_chacha 0.3.1", + "rustls 0.21.12", "tempfile", "tokio", - "tokio-rustls 0.24.1", ] [[package]] @@ -7429,10 +7429,10 @@ dependencies = [ "ic-types", "json5", "maplit", + "rustls 0.21.12", "serde", "thiserror", "tokio", - "tokio-rustls 0.24.1", "x509-parser", ] @@ -7444,8 +7444,8 @@ dependencies = [ "ic-base-types", "ic-crypto-tls-interfaces", "mockall", + "rustls 0.21.12", "tokio", - "tokio-rustls 0.24.1", ] [[package]] @@ -7537,7 +7537,7 @@ version = "0.9.0" dependencies = [ "ic-base-types", "ic-crypto-tls-interfaces", - "tokio-rustls 0.24.1", + "rustls 0.21.12", "x509-parser", ] @@ -9966,13 +9966,13 @@ dependencies = [ "phantom_newtype", "prometheus", "quinn", + "rustls 0.21.12", "serde", "serde_bytes", "slog", "socket2 0.5.6", "tokio", "tokio-metrics", - "tokio-rustls 0.24.1", "tokio-util", "tower", "turmoil", @@ -11642,6 +11642,7 @@ dependencies = [ "nix 0.24.3", "parking_lot 0.12.1", "rand 0.8.5", + "rustls 0.21.12", "rusty-fork", "serde", "serde_cbor", @@ -11649,7 +11650,6 @@ dependencies = [ "socket2 0.5.6", "tempfile", "tokio", - "tokio-rustls 0.24.1", "tower", "wasmprinter", "wat", @@ -13084,7 +13084,7 @@ dependencies = [ "pem 3.0.3", "pin-project", "rand 0.8.5", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "secrecy", "serde", @@ -15913,7 +15913,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "thiserror", "tokio", "tracing", @@ -15929,7 +15929,7 @@ dependencies = [ "rand 0.8.5", "ring 0.16.20", "rustc-hash", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-native-certs 0.6.2", "slab", "thiserror", @@ -16450,7 +16450,7 @@ dependencies = [ "once_cell", "percent-encoding 2.3.0", "pin-project-lite", - "rustls 0.21.10", + "rustls 0.21.12", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -16902,9 +16902,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ "log", "ring 0.17.8", @@ -18885,7 +18885,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.10", + "rustls 0.21.12", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 52f59ac4127..fb3e1106e8e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -519,7 +519,7 @@ reqwest = { version = "0.12.3", default-features = false, features = [ "socks", "stream", ] } -rustls = { version = "0.21.10", features = ["dangerous_configuration"] } +rustls = { version = "0.21.12", features = ["dangerous_configuration"] } serde = { version = "1.0", features = ["derive"] } serde_bytes = "0.11" serde_cbor = "0.11.2" diff --git a/bazel/external_crates.bzl b/bazel/external_crates.bzl index 6d482acbf2d..13793dffc5d 100644 --- a/bazel/external_crates.bzl +++ b/bazel/external_crates.bzl @@ -1038,7 +1038,7 @@ def external_crates_repository(name, cargo_lockfile, lockfile, sanitizers_enable version = "^1.1.0", ), "rustls": crate.spec( - version = "^0.21.10", + version = "^0.21.12", features = [ "dangerous_configuration", ], diff --git a/rs/crypto/temp_crypto/BUILD.bazel b/rs/crypto/temp_crypto/BUILD.bazel index f4c70f962ec..69ec82aa26c 100644 --- a/rs/crypto/temp_crypto/BUILD.bazel +++ b/rs/crypto/temp_crypto/BUILD.bazel @@ -22,9 +22,9 @@ DEPENDENCIES = [ "//rs/types/base_types", "//rs/types/types", "@crate_index//:rand", + "@crate_index//:rustls", "@crate_index//:tempfile", "@crate_index//:tokio", - "@crate_index//:tokio-rustls", ] MACRO_DEPENDENCIES = [ diff --git a/rs/crypto/temp_crypto/Cargo.toml b/rs/crypto/temp_crypto/Cargo.toml index cdc25fb94da..a7621ea6546 100644 --- a/rs/crypto/temp_crypto/Cargo.toml +++ b/rs/crypto/temp_crypto/Cargo.toml @@ -27,9 +27,9 @@ ic-registry-keys = { path = "../../registry/keys" } ic-registry-proto-data-provider = { path = "../../registry/proto_data_provider" } ic-types = { path = "../../types/types" } rand = "0.8" +rustls = { workspace = true } tempfile = "3.1.0" tokio = { workspace = true } -tokio-rustls = { workspace = true } [dev-dependencies] assert_matches = { workspace = true } diff --git a/rs/crypto/temp_crypto/src/lib.rs b/rs/crypto/temp_crypto/src/lib.rs index d7d80325b1b..20312cada92 100644 --- a/rs/crypto/temp_crypto/src/lib.rs +++ b/rs/crypto/temp_crypto/src/lib.rs @@ -97,13 +97,13 @@ pub mod internal { use ic_types::signature::BasicSignatureBatch; use ic_types::{NodeId, RegistryVersion, SubnetId}; use rand::rngs::OsRng; + use rustls::{ClientConfig, ServerConfig}; use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::ops::Deref; use std::path::{Path, PathBuf}; use std::sync::Arc; use tempfile::TempDir; use tokio::net::TcpStream; - use tokio_rustls::rustls::{ClientConfig, ServerConfig}; /// This struct combines the following two items: /// * a crypto component whose state lives in a temporary directory diff --git a/rs/crypto/tls_interfaces/BUILD.bazel b/rs/crypto/tls_interfaces/BUILD.bazel index d5ace626642..3567187b874 100644 --- a/rs/crypto/tls_interfaces/BUILD.bazel +++ b/rs/crypto/tls_interfaces/BUILD.bazel @@ -28,10 +28,10 @@ rust_library( deps = [ "//rs/protobuf", "//rs/types/types", + "@crate_index//:rustls", "@crate_index//:serde", "@crate_index//:thiserror", "@crate_index//:tokio", - "@crate_index//:tokio-rustls", "@crate_index//:x509-parser", ], ) diff --git a/rs/crypto/tls_interfaces/Cargo.toml b/rs/crypto/tls_interfaces/Cargo.toml index 9f276d5505f..e725d266832 100644 --- a/rs/crypto/tls_interfaces/Cargo.toml +++ b/rs/crypto/tls_interfaces/Cargo.toml @@ -11,9 +11,9 @@ async-trait = { workspace = true } ic-types = { path = "../../types/types" } ic-protobuf = { path = "../../protobuf" } serde = { workspace = true } +rustls = { workspace = true } thiserror = { workspace = true } tokio = { workspace = true } -tokio-rustls = { workspace = true } x509-parser = { workspace = true } [dev-dependencies] diff --git a/rs/crypto/tls_interfaces/mocks/BUILD.bazel b/rs/crypto/tls_interfaces/mocks/BUILD.bazel index 7998757a1eb..69830558e8f 100644 --- a/rs/crypto/tls_interfaces/mocks/BUILD.bazel +++ b/rs/crypto/tls_interfaces/mocks/BUILD.bazel @@ -15,7 +15,7 @@ rust_library( "//rs/crypto/tls_interfaces", "//rs/types/base_types", "@crate_index//:mockall", + "@crate_index//:rustls", "@crate_index//:tokio", - "@crate_index//:tokio-rustls", ], ) diff --git a/rs/crypto/tls_interfaces/mocks/Cargo.toml b/rs/crypto/tls_interfaces/mocks/Cargo.toml index 6fa45b3213d..cebafd5a18e 100644 --- a/rs/crypto/tls_interfaces/mocks/Cargo.toml +++ b/rs/crypto/tls_interfaces/mocks/Cargo.toml @@ -11,5 +11,5 @@ async-trait = { workspace = true } ic-base-types = { path = "../../../types/base_types" } ic-crypto-tls-interfaces = { path = "../" } mockall = { workspace = true } +rustls = { workspace = true } tokio = { workspace = true } -tokio-rustls = { workspace = true } diff --git a/rs/crypto/tls_interfaces/mocks/src/lib.rs b/rs/crypto/tls_interfaces/mocks/src/lib.rs index 7261948d32a..1bc45550319 100644 --- a/rs/crypto/tls_interfaces/mocks/src/lib.rs +++ b/rs/crypto/tls_interfaces/mocks/src/lib.rs @@ -5,8 +5,8 @@ use ic_crypto_tls_interfaces::{ TlsHandshake, TlsServerHandshakeError, TlsStream, }; use mockall::*; +use rustls::{ClientConfig, ServerConfig}; use tokio::net::TcpStream; -use tokio_rustls::rustls::{ClientConfig, ServerConfig}; mock! { pub TlsHandshake {} diff --git a/rs/crypto/tls_interfaces/src/lib.rs b/rs/crypto/tls_interfaces/src/lib.rs index 035829a186a..97468f05ec8 100644 --- a/rs/crypto/tls_interfaces/src/lib.rs +++ b/rs/crypto/tls_interfaces/src/lib.rs @@ -6,13 +6,13 @@ use async_trait::async_trait; use ic_protobuf::registry::crypto::v1::X509PublicKeyCert; use ic_types::registry::RegistryClientError; use ic_types::{NodeId, RegistryVersion}; +use rustls::{ClientConfig, ServerConfig}; use serde::{Deserialize, Deserializer, Serialize}; use std::collections::BTreeSet; use std::fmt::{self, Display, Formatter}; use thiserror::Error; use tokio::io::{AsyncRead, AsyncWrite}; use tokio::net::TcpStream; -use tokio_rustls::rustls::{ClientConfig, ServerConfig}; use x509_parser::certificate::X509Certificate; #[cfg(test)] diff --git a/rs/crypto/utils/tls/BUILD.bazel b/rs/crypto/utils/tls/BUILD.bazel index 1485a75a83a..ef0da76f7f7 100644 --- a/rs/crypto/utils/tls/BUILD.bazel +++ b/rs/crypto/utils/tls/BUILD.bazel @@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"]) DEPENDENCIES = [ "//rs/types/base_types", "//rs/crypto/tls_interfaces", - "@crate_index//:tokio-rustls", + "@crate_index//:rustls", "@crate_index//:x509-parser", ] diff --git a/rs/crypto/utils/tls/Cargo.toml b/rs/crypto/utils/tls/Cargo.toml index 44f50e82084..7b323a05f2e 100644 --- a/rs/crypto/utils/tls/Cargo.toml +++ b/rs/crypto/utils/tls/Cargo.toml @@ -9,5 +9,5 @@ documentation.workspace = true [dependencies] ic-base-types = { path = "../../../types/base_types" } ic-crypto-tls-interfaces = { path = "../../tls_interfaces" } -tokio-rustls = { workspace = true } +rustls = { workspace = true } x509-parser = { workspace = true } diff --git a/rs/crypto/utils/tls/src/lib.rs b/rs/crypto/utils/tls/src/lib.rs index e8d881bda5d..d871167eb09 100644 --- a/rs/crypto/utils/tls/src/lib.rs +++ b/rs/crypto/utils/tls/src/lib.rs @@ -5,7 +5,7 @@ use std::str::FromStr; use ic_base_types::{NodeId, PrincipalId}; use ic_crypto_tls_interfaces::{MalformedPeerCertificateError, TlsPublicKeyCert}; -use tokio_rustls::rustls::{Certificate, CertificateError, Error}; +use rustls::{Certificate, CertificateError, Error}; use x509_parser::certificate::X509Certificate; use x509_parser::x509::X509Name; diff --git a/rs/p2p/quic_transport/BUILD.bazel b/rs/p2p/quic_transport/BUILD.bazel index 294ea79e62d..2b72593fcdb 100644 --- a/rs/p2p/quic_transport/BUILD.bazel +++ b/rs/p2p/quic_transport/BUILD.bazel @@ -26,13 +26,13 @@ DEPENDENCIES = [ "@crate_index//:http-serde", "@crate_index//:prometheus", "@crate_index//:quinn", + "@crate_index//:rustls", "@crate_index//:serde", "@crate_index//:serde_bytes", "@crate_index//:slog", "@crate_index//:socket2", "@crate_index//:tokio", "@crate_index//:tokio-metrics", - "@crate_index//:tokio-rustls", "@crate_index//:tokio-util", "@crate_index//:tower", ] diff --git a/rs/p2p/quic_transport/Cargo.toml b/rs/p2p/quic_transport/Cargo.toml index c0482fc2517..6a96418cc2b 100644 --- a/rs/p2p/quic_transport/Cargo.toml +++ b/rs/p2p/quic_transport/Cargo.toml @@ -24,13 +24,13 @@ ic-metrics = { path = "../../monitoring/metrics" } phantom_newtype = { path = "../../phantom_newtype" } prometheus = { workspace = true } quinn = { workspace = true } +rustls = { workspace = true } serde = { workspace = true } serde_bytes = { workspace = true } slog = { workspace = true } socket2 = { workspace = true } tokio = { workspace = true } tokio-metrics = { workspace = true } -tokio-rustls = { workspace = true } tokio-util = { workspace = true } tower = { workspace = true } diff --git a/rs/p2p/quic_transport/src/connection_manager.rs b/rs/p2p/quic_transport/src/connection_manager.rs index 3786888e4f8..de3c93c1c6f 100644 --- a/rs/p2p/quic_transport/src/connection_manager.rs +++ b/rs/p2p/quic_transport/src/connection_manager.rs @@ -617,7 +617,7 @@ impl ConnectionManager { let certs = &established .peer_identity() .ok_or(ConnectionEstablishError::MissingPeerIdentity)? - .downcast::>() + .downcast::>() .map_err(|_| { ConnectionEstablishError::MalformedPeerIdentity(MalformedPeerCertificateError { internal_error: "can't downcast peer identity".to_string(), diff --git a/rs/p2p/quic_transport/tests/common.rs b/rs/p2p/quic_transport/tests/common.rs index 3478aa48bff..f20dc3c63a6 100644 --- a/rs/p2p/quic_transport/tests/common.rs +++ b/rs/p2p/quic_transport/tests/common.rs @@ -6,7 +6,7 @@ use std::{ use ic_base_types::{NodeId, RegistryVersion}; use ic_crypto_tls_interfaces::{SomeOrAllNodes, TlsConfig, TlsConfigError}; use ic_p2p_test_utils::{temp_crypto_component_with_tls_keys, RegistryConsensusHandle}; -use tokio_rustls::rustls::{ClientConfig, ServerConfig}; +use rustls::{ClientConfig, ServerConfig}; pub struct PeerRestrictedTlsConfig { allowed_peers: Arc>>, diff --git a/rs/test_utilities/BUILD.bazel b/rs/test_utilities/BUILD.bazel index c1c9bb124a6..ed5f87d23d7 100644 --- a/rs/test_utilities/BUILD.bazel +++ b/rs/test_utilities/BUILD.bazel @@ -47,13 +47,13 @@ rust_library( "@crate_index//:nix", "@crate_index//:parking_lot", "@crate_index//:rand", + "@crate_index//:rustls", "@crate_index//:serde", "@crate_index//:serde_cbor", "@crate_index//:slog", "@crate_index//:socket2", "@crate_index//:tempfile", "@crate_index//:tokio", - "@crate_index//:tokio-rustls", "@crate_index//:tower", "@crate_index//:wat", ], diff --git a/rs/test_utilities/Cargo.toml b/rs/test_utilities/Cargo.toml index a73233b95ac..aae3d95e0a9 100644 --- a/rs/test_utilities/Cargo.toml +++ b/rs/test_utilities/Cargo.toml @@ -44,13 +44,13 @@ lazy_static = "1.4.0" nix = { workspace = true } parking_lot = "0.12.1" rand = "0.8" +rustls = { workspace = true } serde = { workspace = true } serde_cbor = { workspace = true } slog = { workspace = true } socket2 = { workspace = true } tempfile = "3.1.0" tokio = { workspace = true } -tokio-rustls = { workspace = true } wat = "1.0.52" tower = { workspace = true } diff --git a/rs/test_utilities/src/crypto.rs b/rs/test_utilities/src/crypto.rs index 170e824b530..29704978e74 100644 --- a/rs/test_utilities/src/crypto.rs +++ b/rs/test_utilities/src/crypto.rs @@ -1,14 +1,11 @@ pub mod fake_tls_handshake; -pub use ic_crypto_test_utils::files as temp_dir; -use ic_crypto_tls_interfaces::{SomeOrAllNodes, TlsConfig, TlsConfigError}; -use tokio_rustls::rustls::{ClientConfig, PrivateKey, RootCertStore, ServerConfig}; - use ic_crypto_interfaces_sig_verification::{BasicSigVerifierByPublicKey, CanisterSigVerifier}; use ic_crypto_internal_types::sign::threshold_sig::ni_dkg::CspNiDkgDealing; use ic_crypto_temp_crypto::TempCryptoComponent; use ic_crypto_test_utils_canister_threshold_sigs::dummy_values; use ic_crypto_test_utils_ni_dkg::dummy_transcript_for_tests_with_params; +use ic_crypto_tls_interfaces::{SomeOrAllNodes, TlsConfig, TlsConfigError}; use ic_interfaces::crypto::{ BasicSigVerifier, BasicSigner, CheckKeysWithRegistryError, CurrentNodePublicKeysError, IDkgDealingEncryptionKeyRotationError, IDkgKeyRotationResult, IDkgProtocol, KeyManager, @@ -41,6 +38,7 @@ use ic_types::signature::{BasicSignature, BasicSignatureBatch}; use ic_types::*; use ic_types::{NodeId, RegistryVersion}; use rand::{rngs::StdRng, RngCore, SeedableRng}; +use rustls::{ClientConfig, PrivateKey, RootCertStore, ServerConfig}; use std::collections::{BTreeMap, BTreeSet, HashSet}; use std::sync::Arc;