Re: Move OpenSSL random under USE_OPENSSL_RANDOM

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Дата
Msg-id 20201105122834.GB17513@paquier.xyz
обсуждение исходный текст
Ответ на Re: Move OpenSSL random under USE_OPENSSL_RANDOM  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Список pgsql-hackers
On Thu, Nov 05, 2020 at 01:18:15PM +0100, Daniel Gustafsson wrote:
> What about the (hypothetical) situation where USE_OPENSSL_RANDOM is used
> without USE_OPENSSL? Wouldn't the below make sure we cover all bases?

You can actually try that combination, because it is possible today to
compile without --with-openssl but try to enforce USE_OPENSSL_RANDOM.
This leads to a compilation failure.  I think that it is important to
have the #if/#elif business in the init function match the conditions
of the main function.

>     #if defined(USE_OPENSSL) || defined(USE_OPENSSL_RANDOM)

It seems to me that this one would become incorrect if compiling with
OpenSSL but select a random source that requires an initialization, as
it would enforce only OpenSSL initialization all the time.
Theoretical point now, of course, because such combination does not
exist yet in the code.
--
Michael

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: redundant error messages
Следующее
От: Matthias van de Meent
Дата:
Сообщение: Re: libpq compression