How to use cert authentication with pg_dump in windows

From: Andrus <kobruleht2(at)hot(dot)ee>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: How to use cert authentication with pg_dump in windows
Date: 2025-06-07 06:40:02
Message-ID: 77196b85-f79e-4c9a-afef-8b5ad6f0ee44@hot.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2025-06-07 11:53:14 Re: Regarding fillfactor use case for only delete ops
Previous Message Adrian Klaver 2025-06-06 23:20:23 Re: Regarding fillfactor use case for only delete ops