fix: install rustls ring crypto provider at startup

Rustls 0.23 requires an explicit CryptoProvider. Enable the ring
feature and call install_default() before any TLS operations.
This commit is contained in:
2026-03-20 14:15:16 +00:00
parent 5bdb78933f
commit 184ad85c60
2 changed files with 6 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ k8s-openapi = { version = "0.24", features = ["v1_32"] }
# HTTP + TLS # HTTP + TLS
reqwest = { version = "0.12", features = ["json", "rustls-tls", "blocking"] } reqwest = { version = "0.12", features = ["json", "rustls-tls", "blocking"] }
rustls = "0.23" rustls = { version = "0.23", features = ["ring"] }
# SSH # SSH
russh = "0.46" russh = "0.46"

View File

@@ -22,6 +22,11 @@ mod users;
#[tokio::main] #[tokio::main]
async fn main() { async fn main() {
// Install rustls crypto provider (ring) before any TLS operations.
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install rustls crypto provider");
// Initialize tracing subscriber. // Initialize tracing subscriber.
// Respects RUST_LOG env var (e.g. RUST_LOG=debug, RUST_LOG=sunbeam=trace). // Respects RUST_LOG env var (e.g. RUST_LOG=debug, RUST_LOG=sunbeam=trace).
// Default: warn for dependencies, info for sunbeam. // Default: warn for dependencies, info for sunbeam.