diff --git a/Cargo.lock b/Cargo.lock index 966e59241..3215c9867 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4243,6 +4243,7 @@ dependencies = [ "http", "json", "log", + "rustls", "rustyline", "shellwords", "zingolib", diff --git a/zingocli/Cargo.toml b/zingocli/Cargo.toml index c3beb5f2a..0f4448d43 100644 --- a/zingocli/Cargo.toml +++ b/zingocli/Cargo.toml @@ -5,6 +5,7 @@ edition = "2021" [dependencies] zingolib = { path = "../zingolib/", features = ["deprecations", "test-elevation"] } +rustls = { version = "0.23.13", features = ["ring"] } clap = { workspace = true } http = { workspace = true } diff --git a/zingocli/src/lib.rs b/zingocli/src/lib.rs index 23c0f9a2e..e2d0756b7 100644 --- a/zingocli/src/lib.rs +++ b/zingocli/src/lib.rs @@ -11,6 +11,7 @@ use std::sync::Arc; use log::{error, info}; use clap::{self, Arg}; +use rustls; use zingolib::config::ChainType; use zingolib::testutils::regtest; use zingolib::wallet::WalletBase; @@ -513,6 +514,11 @@ fn dispatch_command_or_start_interactive(cli_config: &ConfigTemplate) { /// TODO: Add Doc Comment Here! pub fn run_cli() { + // install default crypto provider (ring) + if let Err(e) = rustls::crypto::ring::default_provider().install_default() { + eprintln!("Error installing crypto provider: {:?}", e) + }; + // Initialize logging if let Err(e) = LightClient::init_logging() { eprintln!("Could not initialize logging: {e}")