Обсуждение: Could not read certificate file from while upgrading to PostgreSQLClient 12.9

Поиск
Список
Период
Сортировка

Could not read certificate file from while upgrading to PostgreSQLClient 12.9

От
M Tarkeshwar Rao
Дата:

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