Skip to content

Commit d905758

Browse files
committed
store: Remove unused SSL support
We could, in theory, establish SSL connections for the notification listener. Since that uses the same PG URL as the main connections for data through diesel, it was actually not possible to use SSL as we don't support it for our diesel connections. Until we are able to set up SSL connections across the board, remove the defunct SSL support in the notification listener.
1 parent 1aa4398 commit d905758

File tree

3 files changed

+2
-38
lines changed

3 files changed

+2
-38
lines changed

Cargo.lock

Lines changed: 0 additions & 27 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

store/postgres/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ lazy_static = "1.5"
2121
lru_time_cache = "0.11"
2222
maybe-owned = "0.3.4"
2323
postgres = "0.19.1"
24-
openssl = "0.10.64"
25-
postgres-openssl = "0.5.0"
2624
rand = "0.8.4"
2725
serde = { workspace = true }
2826
serde_json = { workspace = true }

store/postgres/src/notification_listener.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@ use diesel::sql_types::Text;
44
use graph::prelude::tokio::sync::mpsc::error::SendTimeoutError;
55
use graph::util::backoff::ExponentialBackoff;
66
use lazy_static::lazy_static;
7-
use openssl::ssl::{SslConnector, SslMethod, SslVerifyMode};
8-
use postgres::Notification;
97
use postgres::{fallible_iterator::FallibleIterator, Client};
10-
use postgres_openssl::MakeTlsConnector;
8+
use postgres::{NoTls, Notification};
119
use std::sync::atomic::{AtomicBool, Ordering};
1210
use std::sync::{Arc, Barrier, Mutex};
1311
use std::thread;
@@ -123,12 +121,7 @@ impl NotificationListener {
123121
let mut backoff =
124122
ExponentialBackoff::new(Duration::from_secs(1), Duration::from_secs(30));
125123
loop {
126-
let mut builder = SslConnector::builder(SslMethod::tls())
127-
.expect("unable to create SslConnector builder");
128-
builder.set_verify(SslVerifyMode::NONE);
129-
let connector = MakeTlsConnector::new(builder.build());
130-
131-
let res = Client::connect(postgres_url, connector).and_then(|mut conn| {
124+
let res = Client::connect(postgres_url, NoTls).and_then(|mut conn| {
132125
conn.execute(format!("LISTEN {}", channel_name).as_str(), &[])?;
133126
Ok(conn)
134127
});

0 commit comments

Comments
 (0)