Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2
Дата
Msg-id X8maQe5Am7Q141f4@paquier.xyz
обсуждение исходный текст
Ответ на Re: scram-sha-256 broken with FIPS and OpenSSL 1.0.2  (Daniel Gustafsson <daniel@yesql.se>)
Список pgsql-hackers
On Thu, Dec 03, 2020 at 10:58:39PM +0100, Daniel Gustafsson wrote:
> This version looks good to me, and builds/tests without any issues.  While I
> didn't try to adapt the libnss patch to the resowner machinery, I don't see any
> reasons off the cuff why it wouldn't work with the scaffolding provided here.

Based on my read of the code in lib/freebl/, SHA256ContextStr & co
hold the context data for SHA2, but are headers like sha256.h
installed?  I don't know enough of NSS to be able to answer to
that.  If, like OpenSSL, the context internals are not provided, I
think that you could use SHA256_NewContext() and track the allocation
with the resource owner callbacks, but doing a palloc() would be
much simpler if the context internals are available.

> My only question is:
>
> +#ifndef FRONTEND
> +               elog(ERROR, "out of memory");
> Shouldn't that be an ereport using ERRCODE_OUT_OF_MEMORY?

That makes sense, fixed.

I have done more testing across all versions of OpenSSL, and applied
this one, meaning that we are done for SHA2.  Thanks for the reviews!
Now, moving back to MD5..
--
Michael

Вложения

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

Предыдущее
От: Fujii Masao
Дата:
Сообщение: Re: Add Information during standby recovery conflicts
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: Single transaction in the tablesync worker?