mirror of
https://github.com/moghtech/komodo.git
synced 2026-08-25 08:00:17 +00:00
clean up crypto provider install
This commit is contained in:
@@ -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!(
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user