From f07b9246a88c7b34a6a2ea0d5a59392ba30e9764 Mon Sep 17 00:00:00 2001 From: Eugene Date: Tue, 16 Jul 2024 12:56:42 +0200 Subject: [PATCH] switch to rustls --- Cargo.lock | 101 +----------------------------- warpgate-admin/Cargo.toml | 2 +- warpgate-common/Cargo.toml | 2 +- warpgate-core/Cargo.toml | 2 +- warpgate-db-migrations/Cargo.toml | 2 +- warpgate-protocol-http/Cargo.toml | 5 +- warpgate-protocol-ssh/Cargo.toml | 2 +- 7 files changed, 12 insertions(+), 104 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eed3755..76368d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1541,21 +1541,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.2.1" @@ -2091,19 +2076,6 @@ dependencies = [ "tokio-io-timeout", ] -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] - [[package]] name = "iana-time-zone" version = "0.1.60" @@ -2622,24 +2594,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - [[package]] name = "nix" version = "0.27.1" @@ -2841,50 +2795,12 @@ dependencies = [ "url", ] -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.55", -] - [[package]] name = "openssl-probe" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-sys" -version = "0.9.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "option-ext" version = "0.2.0" @@ -3678,12 +3594,10 @@ dependencies = [ "http-body", "hyper", "hyper-rustls", - "hyper-tls", "ipnet", "js-sys", "log", "mime", - "native-tls", "once_cell", "percent-encoding", "pin-project-lite", @@ -3696,7 +3610,6 @@ dependencies = [ "sync_wrapper", "system-configuration", "tokio", - "tokio-native-tls", "tokio-rustls 0.24.1", "tokio-util", "tower-service", @@ -4667,10 +4580,11 @@ dependencies = [ "indexmap 2.2.6", "log", "memchr", - "native-tls", "once_cell", "paste", "percent-encoding", + "rustls 0.21.10", + "rustls-pemfile", "serde", "serde_json", "sha2", @@ -4682,6 +4596,7 @@ dependencies = [ "tracing", "url", "uuid", + "webpki-roots", ] [[package]] @@ -5146,16 +5061,6 @@ dependencies = [ "syn 2.0.55", ] -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - [[package]] name = "tokio-rustls" version = "0.23.4" diff --git a/warpgate-admin/Cargo.toml b/warpgate-admin/Cargo.toml index f402adc..3e74df4 100644 --- a/warpgate-admin/Cargo.toml +++ b/warpgate-admin/Cargo.toml @@ -28,7 +28,7 @@ russh-keys = { version = "0.44.0-beta.3" } # russh-keys = { version = "0.23.0-beta.1", path = "../../russh/russh-keys" } rust-embed = "8.3" sea-orm = { version = "0.12.2", features = [ - "runtime-tokio-native-tls", + "runtime-tokio-rustls", "macros", ], default-features = false } serde = "1.0" diff --git a/warpgate-common/Cargo.toml b/warpgate-common/Cargo.toml index 43785ce..99b2314 100644 --- a/warpgate-common/Cargo.toml +++ b/warpgate-common/Cargo.toml @@ -27,7 +27,7 @@ rand = "0.8" rand_chacha = "0.3" rand_core = { version = "0.6", features = ["std"] } sea-orm = { version = "0.12.2", features = [ - "runtime-tokio-native-tls", + "runtime-tokio-rustls", "macros", ], default-features = false } serde = "1.0" diff --git a/warpgate-core/Cargo.toml b/warpgate-core/Cargo.toml index 64af0c5..ac61b0f 100644 --- a/warpgate-core/Cargo.toml +++ b/warpgate-core/Cargo.toml @@ -31,7 +31,7 @@ rand = "0.8" rand_chacha = "0.3" rand_core = { version = "0.6", features = ["std"] } sea-orm = { version = "0.12.2", features = [ - "runtime-tokio-native-tls", + "runtime-tokio-rustls", "macros", ], default-features = false } serde = "1.0" diff --git a/warpgate-db-migrations/Cargo.toml b/warpgate-db-migrations/Cargo.toml index a3fd324..7798b3c 100644 --- a/warpgate-db-migrations/Cargo.toml +++ b/warpgate-db-migrations/Cargo.toml @@ -11,7 +11,7 @@ version = "0.9.1" async-std = { version = "^1.11", features = ["attributes"] } chrono = { version = "0.4", default-features = false, features = ["serde"] } sea-orm = { version = "0.12.2", features = [ - "runtime-tokio-native-tls", + "runtime-tokio-rustls", "macros", "with-chrono", "with-uuid", diff --git a/warpgate-protocol-http/Cargo.toml b/warpgate-protocol-http/Cargo.toml index 7606a83..3eb4366 100644 --- a/warpgate-protocol-http/Cargo.toml +++ b/warpgate-protocol-http/Cargo.toml @@ -24,7 +24,10 @@ poem = { version = "^1.3.50", features = [ "embed", ] } poem-openapi = { version = "2.0", features = ["swagger-ui"] } -reqwest = { version = "0.11", features = ["rustls-tls-native-roots", "stream"] } +reqwest = { version = "0.11", features = [ + "rustls-tls-native-roots", + "stream", +], default-features = false } serde = "1.0" serde_json = "1.0" tokio = { version = "1.20", features = ["tracing", "signal"] } diff --git a/warpgate-protocol-ssh/Cargo.toml b/warpgate-protocol-ssh/Cargo.toml index 4f11269..9046340 100644 --- a/warpgate-protocol-ssh/Cargo.toml +++ b/warpgate-protocol-ssh/Cargo.toml @@ -19,7 +19,7 @@ russh = { version = "0.44.0-beta.3" } russh-keys = { version = "0.44.0-beta.3" } # russh-keys = { version = "0.23.0-beta.1", path = "../../russh/russh-keys" } sea-orm = { version = "0.12.2", features = [ - "runtime-tokio-native-tls", + "runtime-tokio-rustls", ], default-features = false } thiserror = "1.0" time = "0.3"