Skip to content

Commit

Permalink
Add rustls
Browse files Browse the repository at this point in the history
  • Loading branch information
amaury1093 committed Dec 18, 2024
1 parent aae3f0c commit 6bcfa56
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 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 backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ tracing = "0.1.40"
tracing-subscriber = "0.3.18"
uuid = "1.10"
warp = "0.3"
rustls = { version = "0.23", features = ["ring"] }

[dev-dependencies]
toml = "0.8"
4 changes: 4 additions & 0 deletions backend/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION");
async fn main() -> Result<(), anyhow::Error> {
// Initialize logging.
tracing_subscriber::fmt::init();
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install rustls crypto provider");

info!(target: LOG_TARGET, version=?CARGO_PKG_VERSION, "Running Reacher");
let mut config = load_config().await?;
config.connect().await?;
Expand Down
1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ check-if-email-exists = { path = "../core" }
clap = { version = "3.2", features = ["derive", "env"] }
once_cell = "1.19"
openssl = { version = "0.10", features = ["vendored"] }
rustls = { version = "0.23", features = ["ring"] }
serde = "1.0"
serde_json = "1.0"
tracing-subscriber = "0.3.18"
Expand Down
3 changes: 3 additions & 0 deletions cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ pub(crate) static CONF: Lazy<Cli> = Lazy::new(Cli::parse);
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
tracing_subscriber::fmt::init();
rustls::crypto::ring::default_provider()
.install_default()
.expect("Failed to install rustls crypto provider");

let to_email = &CONF.to_email;

Expand Down

0 comments on commit 6bcfa56

Please sign in to comment.