Could not read certificate file from while upgrading to PostgreSQLClient 12.9 - Mailing list pgsql-general

From M Tarkeshwar Rao
Subject Could not read certificate file from while upgrading to PostgreSQLClient 12.9
Date
Msg-id PAXPR07MB83875FD1A7236FC34645837DAE0B9@PAXPR07MB8387.eurprd07.prod.outlook.com
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: Scott Macri
Date:
Subject: Simple Query Doesn't Even with Data
Next
From: Julien Rouhaud
Date:
Subject: Re: Simple Query Doesn't Even with Data