“tlsv1 alert unknown ca” with PQconnectdb

From: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
To: "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>, "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Cc: Avinesh Kumar <avinesh(dot)kumar(at)ericsson(dot)com>, Kirti Dhar Upadhyay K <kirti(dot)k(dot)dhar(dot)upadhyay(at)ericsson(dot)com>, Neeraj Gupta G <neeraj(dot)g(dot)gupta(at)ericsson(dot)com>
Subject: “tlsv1 alert unknown ca” with PQconnectdb
Date: 2021-08-04 14:08:59
Message-ID: AM8PR07MB8229AFC37537B83FE085784CAEF19@AM8PR07MB8229.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

I made following changes in my Postgres server which means I am enabling one way authentication: (Disabled Mutual authentication. Only client will authenticate server.)
hostssl all myuser 0.0.0.0/0 md5 clientcert=0

I am trying psql with following options where I am providing client certificates also. It is connected perfectly.
psql "host= 10.10.11.18 sslmode=verify-ca sslrootcert=em-ca-crt.pem sslcert=em-client-crt.pem sslkey=em-client-key.pem port=5433 user=postgres dbname=postgres"

Same when we used with C api (PQconnectdb((const char *)str);) it is failing with following error message.

“tlsv1 alert unknown ca” <https://serverfault.com/questions/793260/what-does-tlsv1-alert-unknown-ca-mean>

Also we tried with Java test program. It is connecting properly. Can you please suggest what could be the reason?

Regards
Tarkeshwar

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2021-08-04 17:38:41 Re: “tlsv1 alert unknown ca” with PQconnectdb
Previous Message Peter J. Holzer 2021-08-03 22:46:15 Re: pg_restore (fromuser -> touser)