Thread: How to use cert authentication with pg_dump in windows

How to use cert authentication with pg_dump in windows

From
Andrus
Date:

Hi!

Postgres 17 server certificate is issued by RapidSsl for server.mydomain.com

PostgreSQL 17 client certificate is created using this tutorial[1].

pg_hba.conf first line contains:

hostssl all varukoopia ::/0 cert


Trying to use it on Windows Server:

set PGSSLCERT=client.crt
set PGSSLKEY=client.key
set PGSSLROOTCERT=system
"c:\Program Files\PostgreSQL\17\bin\pg_dump" --verbose -b -f "test.backup" -F c -h localhost -p 5432 -U varukoopia mydatabase

Throws this error:

> pg_dump: error: connection to server at "localhost" (::1), port 5432 failed: SSL error: unregistered scheme

How to use the client certificate with `pg_dump`?

According to https://github.com/EnterpriseDB/edb-installers/issues/264

windows system certificate store is not supported. How to specify root certificates or disable certificate verification? Certtificate can used only to log on to postgres without password.

  [1]: https://docs.devart.com/studio-for-postgresql/connecting-to-db/generating-ssl-certificate.html


Andrus