Private
Public Access
1
0

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

This commit is contained in:
2026-04-28 23:34:46 +00:00
parent a6b9c054b2
commit 4f9b913f15
4 changed files with 8 additions and 2 deletions

1
Cargo.lock generated
View File

@ -2253,6 +2253,7 @@ dependencies = [
"pm-reports",
"rand 0.8.6",
"reqwest",
"rustls",
"serde",
"serde_json",
"sha2",

View File

@ -53,8 +53,7 @@ chrono = { version = "0.4", features = ["serde"] }
# HTTP client
reqwest = { version = "0.12", features = ["rustls-tls", "json"] }
# TLS
rustls = { version = "0.23" }
rustls = { version = "0.23", features = ["ring"] }
tokio-rustls = { version = "0.26" }
rustls-pemfile = { version = "2" }

View File

@ -17,6 +17,7 @@ pm-reports = { path = "../pm-reports" }
tokio = { workspace = true }
axum = { workspace = true }
axum-server = { workspace = true }
rustls = { workspace = true }
axum-extra = { workspace = true }
tower = { workspace = true }
tower-http = { workspace = true }

View File

@ -33,6 +33,11 @@ pub struct AppState {
#[tokio::main]
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")
.unwrap_or_else(|_| "/etc/patch-manager/config.toml".to_string());