diff --git a/Cargo.lock b/Cargo.lock index 2ddb56a..0bfda36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1215,7 +1215,7 @@ dependencies = [ "http 1.4.2", "hyper 1.10.1", "hyper-util", - "rustls 0.23.41", + "rustls 0.23.43", "tokio", "tokio-rustls 0.26.4", "tower-service", @@ -1758,6 +1758,7 @@ dependencies = [ "rand 0.10.2", "redis", "reqwest", + "rustls 0.23.43", "sd-notify", "serde", "serde_json", @@ -2051,7 +2052,7 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash", - "rustls 0.23.41", + "rustls 0.23.43", "socket2 0.6.4", "thiserror 2.0.19", "tokio", @@ -2073,7 +2074,7 @@ dependencies = [ "rand_pcg", "ring", "rustc-hash", - "rustls 0.23.41", + "rustls 0.23.43", "rustls-pki-types", "slab", "thiserror 2.0.19", @@ -2191,7 +2192,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rand 0.10.2", - "rustls 0.23.41", + "rustls 0.23.43", "rustls-native-certs", "ryu", "socket2 0.6.4", @@ -2279,7 +2280,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "quinn", - "rustls 0.23.41", + "rustls 0.23.43", "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -2369,9 +2370,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.41" +version = "0.23.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b92b125634d9b795e7beca796cc790df15a7fb38323bf3196fda83292d06b1f" +checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" dependencies = [ "aws-lc-rs", "log", @@ -2425,7 +2426,7 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.41", + "rustls 0.23.43", "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki 0.103.13", @@ -2785,7 +2786,7 @@ dependencies = [ "log", "memchr", "percent-encoding", - "rustls 0.23.41", + "rustls 0.23.43", "serde", "serde_json", "sha2 0.10.9", @@ -3282,7 +3283,7 @@ version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" dependencies = [ - "rustls 0.23.41", + "rustls 0.23.43", "tokio", ] @@ -3502,7 +3503,7 @@ dependencies = [ "httparse", "log", "rand 0.10.2", - "rustls 0.23.41", + "rustls 0.23.43", "rustls-pki-types", "sha1 0.11.0", "thiserror 2.0.19", @@ -3604,7 +3605,7 @@ dependencies = [ "flate2", "log", "percent-encoding", - "rustls 0.23.41", + "rustls 0.23.43", "rustls-pki-types", "ureq-proto", "utf8-zero", diff --git a/Cargo.toml b/Cargo.toml index a83d771..484bb0d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,58 +2,75 @@ # SPDX-License-Identifier: AGPL-3.0-or-later [package] name = "notify_push" -version = "0.1.0" # this version number is unused, the version number for the binary will be extracted from the appinfo/info.xml during build +version = "0.1.0" # this version number is unused, the version number for the binary will be extracted from the appinfo/info.xml during build authors = ["Robin Appelman "] edition = "2021" rust-version = "1.94.0" +[workspace] + [dependencies] -redis = { version = "1.3.0", default-features = false, features = ["tokio-comp", "aio", "cluster", "cluster-async", "tls-rustls", "tokio-rustls-comp", "tls-rustls-webpki-roots", "tls-rustls-insecure"] } -serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.150" -thiserror = "2.0.18" -warp = { version = "0.3.7", features = ["tls"] } -tokio = { version = "1.52.3", features = ["macros", "rt-multi-thread", "signal"] } +ahash = "0.8.12" +clap = { version = "4.6.1", features = ["derive"] } +dashmap = "6.2.1" +dotenvy = "0.15.7" +flexi_logger = { version = "0.31.9", features = ["colors"] } futures = "0.3.32" log = "0.4.33" -sqlx = { version = "0.9.0", features = ["runtime-tokio", "tls-rustls-aws-lc-rs", "any", "mysql", "sqlite", "postgres"] } -dotenvy = "0.15.7" -dashmap = "6.2.1" -once_cell = "1.21.4" miette = { version = "7.6.0", features = ["fancy"] } -smallvec = { version = "1.15.2", features = ["serde"] } -reqwest = { version = "0.13.4", features = ["json"] } -warp-real-ip = "0.2.0" +nextcloud-config-parser = "0.15.3" +once_cell = "1.21.4" parse-display = "0.11.0" rand = { version = "0.10.2", features = ["thread_rng"] } -ahash = "0.8.12" -flexi_logger = { version = "0.31.9", features = ["colors"] } +redis = { version = "1.3.0", default-features = false, features = [ + "aio", + "cluster", + "cluster-async", + "tls-rustls", + "tls-rustls-insecure", + "tls-rustls-webpki-roots", + "tokio-comp", + "tokio-rustls-comp" +] } +reqwest = { version = "0.13.4", features = ["json"] } +rustls = { version = "0.23.43", default-features = false } +sd-notify = { version = "0.5.0", optional = true } +serde = { version = "1.0.228", features = ["derive"] } +serde_json = "1.0.150" +smallvec = { version = "1.15.2", features = ["serde"] } +sqlx = { version = "0.9.0", features = [ + "any", + "mysql", + "postgres", + "runtime-tokio", + "sqlite", + "tls-rustls-aws-lc-rs" +] } +thiserror = "2.0.18" +tokio = { version = "1.52.3", features = ["macros", "rt-multi-thread", "signal"] } tokio-stream = { version = "0.1.18", features = ["net"] } -nextcloud-config-parser = "0.15.3" url = "2.5.8" -clap = { version = "4.6.1", features = ["derive"] } -sd-notify = { version = "0.5.0", optional = true } +warp = { version = "0.3.7", features = ["tls"] } +warp-real-ip = "0.2.0" webpki-root-certs = "1.0.8" # https://github.com/transact-rs/sqlx/pull/4303 should be safe to remove after the next sqlx release -whoami = { version = "2.0.2", features = ["std"], default-features = false } +whoami = { version = "2.0.2", default-features = false, features = ["std"] } [dev-dependencies] -mini-redis = "0.4.1" -tokio-tungstenite = "0.30.0" http-auth-basic = "0.3.7" +mini-redis = "0.4.1" test_client = { path = "test_client" } +tokio-tungstenite = "0.30.0" [build-dependencies] nextcloud_appinfo = "0.6.0" +[features] +default = ["systemd"] +systemd = ["dep:sd-notify"] + [profile.dev.package.backtrace] opt-level = 3 [profile.release] lto = true - -[workspace] - -[features] -default = ["systemd"] -systemd = ["dep:sd-notify"] diff --git a/src/main.rs b/src/main.rs index f4a9f9c..8bb88aa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,6 +19,9 @@ use tokio::sync::oneshot; use tokio::task::spawn; fn main() -> Result<()> { + rustls::crypto::aws_lc_rs::default_provider() + .install_default() + .expect("Failed to setup TLS crypto provider"); miette::set_panic_hook(); sqlx::any::install_default_drivers(); let _ = dotenvy::dotenv();