Обсуждение: pgsql: Add missing includes

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

pgsql: Add missing includes

От
Peter Eisentraut
Дата:
Add missing includes

<openssl/x509.h> is necessary to look into the X509 struct, used by
ac3ff8b1d8f98da38c53a701e6397931080a39cf.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1834c1e432d22f9e186950c7dd8598958776e016

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c    | 1 +
src/interfaces/libpq/fe-secure-openssl.c | 1 +
2 files changed, 2 insertions(+)


Re: pgsql: Add missing includes

От
Andres Freund
Дата:
On 2018-01-04 22:58:28 +0000, Peter Eisentraut wrote:
> Add missing includes
> 
> <openssl/x509.h> is necessary to look into the X509 struct, used by
> ac3ff8b1d8f98da38c53a701e6397931080a39cf.

That's not sufficient here:

/home/andres/src/postgresql/src/backend/libpq/be-secure-openssl.c: In function ‘be_tls_get_certificate_hash’:
/home/andres/src/postgresql/src/backend/libpq/be-secure-openssl.c:1269:50: error: dereferencing pointer to incomplete
type‘X509 {aka struct x509_st}’
 
  if (!OBJ_find_sigid_algs(OBJ_obj2nid(server_cert->sig_alg->algorithm),
                                                  ^~
../../../src/Makefile.global:819: recipe for target 'be-secure-openssl.o' failed

It's defined in openssl's include/internal/x509_int.h which also has the
following comment:

/* Internal X509 structures and functions: not for application use */

so this looks like a nonstarter approach that shouldn't be fixed with
additional includes.

Greetings,

Andres Freund