fix: rustls crypto provider + Arc import for cert expiry

This commit is contained in:
M1
2026-03-16 12:39:29 +04:00
parent 500132ba05
commit 20cc8d534b
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -4,11 +4,17 @@ mod types;
use anyhow::Result;
use std::env;
use rustls;
use tokio::time::{sleep, Duration};
use tracing::{error, info};
#[tokio::main]
async fn main() -> Result<()> {
// Install default rustls crypto provider (required for cert expiry checks)
rustls::crypto::ring::default_provider()
.install_default()
.ok(); // ok() — ignore error if already installed
tracing_subscriber::fmt()
.with_env_filter(env::var("RUST_LOG").unwrap_or_else(|_| "info".into()))
.init();