fix: add rustls ring feature and CryptoProvider for TLS support
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 4s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 12s
CI Pipeline / Build .deb & Release (push) Has been skipped
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 4s
CI Pipeline / Clippy Lints (push) Successful in 46s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 4s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 12s
CI Pipeline / Build .deb & Release (push) Has been skipped
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -2253,6 +2253,7 @@ dependencies = [
|
|||||||
"pm-reports",
|
"pm-reports",
|
||||||
"rand 0.8.6",
|
"rand 0.8.6",
|
||||||
"reqwest",
|
"reqwest",
|
||||||
|
"rustls",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
|||||||
@ -53,8 +53,7 @@ chrono = { version = "0.4", features = ["serde"] }
|
|||||||
# HTTP client
|
# HTTP client
|
||||||
reqwest = { version = "0.12", features = ["rustls-tls", "json"] }
|
reqwest = { version = "0.12", features = ["rustls-tls", "json"] }
|
||||||
|
|
||||||
# TLS
|
rustls = { version = "0.23", features = ["ring"] }
|
||||||
rustls = { version = "0.23" }
|
|
||||||
tokio-rustls = { version = "0.26" }
|
tokio-rustls = { version = "0.26" }
|
||||||
rustls-pemfile = { version = "2" }
|
rustls-pemfile = { version = "2" }
|
||||||
|
|
||||||
|
|||||||
@ -17,6 +17,7 @@ pm-reports = { path = "../pm-reports" }
|
|||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
axum = { workspace = true }
|
axum = { workspace = true }
|
||||||
axum-server = { workspace = true }
|
axum-server = { workspace = true }
|
||||||
|
rustls = { workspace = true }
|
||||||
axum-extra = { workspace = true }
|
axum-extra = { workspace = true }
|
||||||
tower = { workspace = true }
|
tower = { workspace = true }
|
||||||
tower-http = { workspace = true }
|
tower-http = { workspace = true }
|
||||||
|
|||||||
@ -33,6 +33,11 @@ pub struct AppState {
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> anyhow::Result<()> {
|
async fn main() -> anyhow::Result<()> {
|
||||||
|
// Install the default crypto provider for rustls (required since 0.23)
|
||||||
|
rustls::crypto::ring::default_provider()
|
||||||
|
.install_default()
|
||||||
|
.expect("Failed to install rustls crypto provider");
|
||||||
|
|
||||||
let config_path = std::env::var("PATCH_MANAGER_CONFIG")
|
let config_path = std::env::var("PATCH_MANAGER_CONFIG")
|
||||||
.unwrap_or_else(|_| "/etc/patch-manager/config.toml".to_string());
|
.unwrap_or_else(|_| "/etc/patch-manager/config.toml".to_string());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user