denodrivers / postgres

PostgreSQL driver for Deno

Home Page:https://denodrivers.github.io/postgres

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"no pg_hba.conf entry for host ... SSL off " error for heroku database

borsemayur2 opened this issue · comments

url=postgres://user:pass@host:port/db?sslmode=require

Sending fatal alert BadCertificate
error: 
Uncaught (in promise) InvalidData: invalid certificate: UnknownIssuer
this.#conn = await Deno.startTls(this.#conn, { hostname });

This issue sadly, means that you won't be able to connect to Heroku using TLS

Deno validates all certificates used to start a connection, and if (and I suspect this is the case here), the certificate is self signed or signed by an untrusted entity it will be discarded

Closing as "won't fix" because this is something that has to be addressed by the Deno development team, more info here denoland/deno#5931