Re: Move OpenSSL random under USE_OPENSSL_RANDOM

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Дата
Msg-id 8D9C19AD-674D-4FD2-820E-9B429053719E@yesql.se
обсуждение исходный текст
Ответ на Re: Move OpenSSL random under USE_OPENSSL_RANDOM  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Список pgsql-hackers
> On 5 Nov 2020, at 13:28, Michael Paquier <michael@paquier.xyz> wrote:

> 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.

Right, how about something like the attached (untested) diff?

> Theoretical point now, of course, because such combination does not
> exist yet in the code.

Not yet, and potentially never will.  Given the consequences of a PRNG which
hasn't been properly initialized I think it's ok to be defensive in this
codepath however.

cheers ./daniel


Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Move OpenSSL random under USE_OPENSSL_RANDOM
Следующее
От: "Hou, Zhijie"
Дата:
Сообщение: RE: Parallel copy