public inbox for [email protected]  
help / color / mirror / Atom feed
From: Andrus <[email protected]>
To: pgsql-general <[email protected]>
Subject: How to use cert authentication with pg_dump in windows
Date: Sat, 7 Jun 2025 09:40:02 +0300
Message-ID: <[email protected]> (raw)

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


reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: How to use cert authentication with pg_dump in windows
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox