fix: install rustls crypto provider in pm-worker main
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 7s
CI Pipeline / Clippy Lints (push) Successful in 49s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 22s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 13s
CI Pipeline / Build .deb & Release (push) Has been skipped
Some checks failed
CI Pipeline / Rust Format Check (push) Failing after 7s
CI Pipeline / Clippy Lints (push) Successful in 49s
CI Pipeline / Rust Unit Tests (push) Successful in 1m1s
CI Pipeline / Security Audit (push) Successful in 22s
CI Pipeline / Frontend Lint & Type Check (push) Successful in 13s
CI Pipeline / Build .deb & Release (push) Has been skipped
Worker was crashing on startup with:
Could not automatically determine the process-level CryptoProvider
Added rustls::crypto:💍:default_provider().install_default()
to pm-worker main.rs, matching the pm-web initialization.
This commit is contained in:
@ -36,6 +36,11 @@ const SCHEMA_CHECK_TIMEOUT: Duration = Duration::from_secs(120);
|
|||||||
|
|
||||||
#[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");
|
||||||
|
|
||||||
// Load configuration
|
// Load configuration
|
||||||
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