Could not read certificate file from while upgrading to PostgreSQLClient 12.9

From: M Tarkeshwar Rao <m(dot)tarkeshwar(dot)rao(at)ericsson(dot)com>
To: "'pgsql-general(at)postgresql(dot)org'" <pgsql-general(at)postgresql(dot)org>
Cc: Nandita Singh S <nandita(dot)s(dot)singh(at)ericsson(dot)com>
Subject: Could not read certificate file from while upgrading to PostgreSQLClient 12.9
Date: 2022-03-10 05:33:08
Message-ID: PAXPR07MB83875FD1A7236FC34645837DAE0B9@PAXPR07MB8387.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi all,

We are upgrading our postgres client in C++ application. Also we upgraded the Postgres server.
Our C++ application making secure connection(TLS) to Postgres DB.

When we are trying to connect PostgreSQLClient 12.9 to Postgre SQL Server 12.9. in SSL Mode.
We are getting below error
could not read certificate file
Its coming from below code .( src/interfaces/libpq/fe-secure-openssl.c)

957 if (SSL_CTX_use_certificate_chain_file(SSL_context, fnbuf) != 1)
958 {
959 char *err = SSLerrmessage(ERR_get_error());
960
961 printfPQExpBuffer(&conn->errorMessage,
962 libpq_gettext("could not read certificate file \"%s\": %s\n"),
963 fnbuf, err);
964 SSLerrfree(err);
965 SSL_CTX_free(SSL_context);
966 return -1;
967 }

Valid Certificate present at the location.
And if manually(command prompt) try to connect postgre Server 12.9 through psql with ssl , it able to connect successfully.

Can you please suggest us how can we go ahead from here?

Regards,
Nandita

Browse pgsql-general by date

  From Date Subject
Next Message Julien Rouhaud 2022-03-10 08:20:27 Re: Simple Query Doesn't Even with Data
Previous Message Scott Macri 2022-03-10 01:40:45 Simple Query Doesn't Even with Data