How to use cert authentication with pg_dump in windows - Mailing list pgsql-general

From Andrus
Subject How to use cert authentication with pg_dump in windows
Date
Msg-id 77196b85-f79e-4c9a-afef-8b5ad6f0ee44@hot.ee
Whole thread Raw
List pgsql-general

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

pgsql-general by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: Regarding fillfactor use case for only delete ops
Next
From: Laurenz Albe
Date:
Subject: Re: Regarding fillfactor use case for only delete ops