Subject: Postgres - SSL connection using only root CA

From: AjithKumar Kannan <[email-masked]>
Date: Wed, 18 Sep 2024 20:43:24 +0530

Hi Team,

Im looking for an option to connect the Postgres DB with only the root CA
file instead of all three cert files (rootca, server, and key).

I have tried the SSL mode as verify-ca in hba config and was trying to
connect the DB using only ca, but that did not succeed. In Postgres, do we
have any option to use only rootca for SSL connections?

Regards,
Ajith

---

From: Scott Ribe <[email-masked]>
Date: Wed, 18 Sep 2024 09:18:24 -0600

SSL without a key is not a thing.

--
Scott Ribe
[email-masked]
https://www.linkedin.com/in/scottribe/

> On Sep 18, 2024, at 9:13 AM, AjithKumar Kannan <[email-masked]> wrote:
> 
> I have tried the SSL mode as verify-ca in hba config and was trying to connect the DB using only ca, but that did not succeed. In Postgres, do we have any option to use only rootca for SSL connections? 
>

---

From: AjithKumar Kannan <[email-masked]>
Date: Fri, 20 Sep 2024 16:57:05 +0530

Hi Scott,

Thanks for your response. So can we connect using rootca and key?

Regards,
Ajith

---

From: Laurenz Albe <[email-masked]>
Date: Fri, 20 Sep 2024 14:11:59 +0200

> Thanks for your response. So can we connect using rootca and key?

No.  You need a certificate and the private key for that certificate.

Yours,
Laurenz Albe