From 1aba7f49b18cee6a7c7ea76f182d43211b23e9ef Mon Sep 17 00:00:00 2001 From: Dessalines Date: Wed, 18 Aug 2021 11:28:37 -0400 Subject: [PATCH] Revert "Fixing issue when local has no openssl certs." This reverts commit dbf7d1b1ee03846e5ef7b7156e618424f1150e1d. --- Cargo.lock | 1 - Cargo.toml | 1 - src/main.rs | 16 +++------------- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 515b0c4f8..4cdcc47f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1880,7 +1880,6 @@ dependencies = [ "lemmy_websocket", "log", "openssl", - "openssl-probe", "reqwest", "serde", "serde_json", diff --git a/Cargo.toml b/Cargo.toml index 88c4e1cc8..be1fd4128 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -63,7 +63,6 @@ activitystreams = "0.7.0-alpha.11" actix-rt = { version = "2.2.0", default-features = false } serde_json = { version = "1.0.66", features = ["preserve_order"] } clokwerk = "0.3.5" -openssl-probe = "0.1.2" [dev-dependencies.cargo-husky] version = "1.5.0" diff --git a/src/main.rs b/src/main.rs index 58d5a129b..504ccc80e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,8 +20,7 @@ use lemmy_utils::{ LemmyError, }; use lemmy_websocket::{chat_server::ChatServer, LemmyContext}; -use log::warn; -use reqwest::{Client, ClientBuilder}; +use reqwest::Client; use std::{sync::Arc, thread}; use tokio::sync::Mutex; @@ -68,21 +67,12 @@ async fn main() -> Result<(), LemmyError> { let activity_queue = create_activity_queue(); - let client = if !openssl_probe::has_ssl_cert_env_vars() { - warn!("No OpenSSL certs found, accepting invalid certs."); - ClientBuilder::new() - .danger_accept_invalid_certs(true) - .build()? - } else { - Client::default() - }; - let chat_server = ChatServer::startup( pool.clone(), rate_limiter.clone(), |c, i, o, d| Box::pin(match_websocket_operation(c, i, o, d)), |c, i, o, d| Box::pin(match_websocket_operation_crud(c, i, o, d)), - client.clone(), + Client::default(), activity_queue.clone(), ) .start(); @@ -92,7 +82,7 @@ async fn main() -> Result<(), LemmyError> { let context = LemmyContext::create( pool.clone(), chat_server.to_owned(), - client.clone(), + Client::default(), activity_queue.to_owned(), ); let rate_limiter = rate_limiter.clone();