Direct connection to Postgres DB with SSL enabled (for Rust worker)?
I am trying to connect directly (without Hyperdrive) to my Postgres DB (hosted on Supabase) via a Rust worker using
tokio-postgres
, as follows:
This only seems to work, however, if I add sslmode=disable
to my DB_CONN_STR
.
If sslmode=require
, then I get: Error: TLS Handshake Failed.
If sslmode=require
and I change SecureTransport::StartTls
to SecureTransport::On
, then I get: Error: Stream was cancelled.
What am I missing here that I need to change? Possibly replacing PassthroughTls
with some other struct/impl?0 Replies