clean up crypto provider install

This commit is contained in:
mbecker20
2025-09-27 21:40:20 -07:00
parent 7239cbb19b
commit 3ecc56dd76
2 changed files with 8 additions and 16 deletions
+4 -6
View File
@@ -40,12 +40,6 @@ async fn app() -> anyhow::Result<()> {
dotenvy::dotenv().ok();
let config = core_config();
logger::init(&config.logging)?;
if let Err(e) =
rustls::crypto::aws_lc_rs::default_provider().install_default()
{
error!("Failed to install default crypto provider | {e:?}");
std::process::exit(1);
};
info!("Komodo Core version: v{}", env!("CARGO_PKG_VERSION"));
// Init public key to crash on failure
@@ -61,6 +55,10 @@ async fn app() -> anyhow::Result<()> {
(false, false) => info!("{:?}", config.sanitized()),
}
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.expect("Failed to install default crypto provider");
// Init jwt client to crash on failure
state::jwt_client();
tokio::join!(
+4 -10
View File
@@ -28,7 +28,10 @@ async fn app() -> anyhow::Result<()> {
info!("{:?}", config.sanitized());
}
install_crypto_provider();
rustls::crypto::aws_lc_rs::default_provider()
.install_default()
.expect("Failed to install default crypto provider");
stats::spawn_polling_thread();
docker::stats::spawn_polling_thread();
@@ -90,12 +93,3 @@ async fn main() -> anyhow::Result<()> {
Ok(())
}
fn install_crypto_provider() {
if let Err(e) =
rustls::crypto::aws_lc_rs::default_provider().install_default()
{
error!("Failed to install default crypto provider | {e:?}");
std::process::exit(1);
};
}