Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustls upgrade fix #1403

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions zingocli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 6 additions & 0 deletions zingocli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use std::sync::Arc;
use log::{error, info};

use clap::{self, Arg};
use rustls;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line should not be necessary as you are calling rustls::crypto::ring::default_provider().install_default() with its full path

use zingolib::config::ChainType;
use zingolib::testutils::regtest;
use zingolib::wallet::WalletBase;
Expand Down Expand Up @@ -513,6 +514,11 @@ fn dispatch_command_or_start_interactive(cli_config: &ConfigTemplate) {

/// TODO: Add Doc Comment Here!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upgrade the doc-comment, to something better.

Please add a doc-test.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the entrypoint to the CLI so i'm not sure we can add a doc-test for this fn

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}")
Expand Down
Loading