fix: rustls crypto provider + Arc import for cert expiry
This commit is contained in:
parent
500132ba05
commit
20cc8d534b
|
|
@ -14,7 +14,7 @@ regex = "1"
|
|||
anyhow = "1"
|
||||
tracing = "0.1"
|
||||
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
||||
rustls = "0.23"
|
||||
rustls = { version = "0.23", features = ["ring"] }
|
||||
rustls-native-certs = "0.8"
|
||||
webpki-roots = "0.26"
|
||||
x509-parser = "0.16"
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue