Revert "Fixing issue when local has no openssl certs."

This reverts commit dbf7d1b1ee03846e5ef7b7156e618424f1150e1d.
This commit is contained in:
Dessalines 2021-08-18 11:28:37 -04:00
parent 736614d633
commit 1aba7f49b1
3 changed files with 3 additions and 15 deletions

1
Cargo.lock generated
View file

@ -1880,7 +1880,6 @@ dependencies = [
"lemmy_websocket",
"log",
"openssl",
"openssl-probe",
"reqwest",
"serde",
"serde_json",

View file

@ -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"

View file

@ -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();