Re: Missing include in be-secure-openssl.c?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Missing include in be-secure-openssl.c?
Дата
Msg-id YX96r7i6h8JXOKD5@paquier.xyz
обсуждение исходный текст
Ответ на Missing include in be-secure-openssl.c?  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Missing include in be-secure-openssl.c?  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
On Sun, Oct 31, 2021 at 06:45:47PM -0400, Tom Lane wrote:
> I observe that the OpenSSL docs say you are supposed to
> #include <openssl/x509.h>
> when using these functions.  We are including that header in
> some other modules, but not here.  I speculate that we've gotten
> away with that so far because of indirect inclusions; but hamerkop
> must be running an OpenSSL version that has rearranged the headers
> enough that that doesn't work anymore.  That machine was offline
> for awhile right before it started to fail, so it seems plausible
> that it was rebuilt with some pretty bleeding-edge OpenSSL version.

Hmm.  I have tested MSVC with 3.0.0 not so long ago, and this was
working, but maybe they upgraded from 1.0.2 to 3.0.0?  I'd be
surprised if this was broken in some way in one of the stable releases
as well.  We've had our share of surprises with OpenSSL when it comes
to major upgrades, but nothing that stood out when it came to minor
release compatibility and ABI, AFAIK.

> Anyway, I propose adding that #include.

openssl/ssl.h includes openssl/x509.h if OPENSSL_NO_DEPRECATED_1_1_0
is not defined, but agreed that adding the header makes sense here.

x509v3.h includes x509.h, so fe-secure-openssl.h would not need an
update.  Now could it be a better practice to include both there?
--
Michael

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Nancarrow
Дата:
Сообщение: Re: Added schema level support for publication.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Use -fvisibility=hidden for shared libraries